miloyip
Repos
29
Followers
9849
Following
32

Events

Update tutorial07.md 我需还需要->我们还需要

Merge pull request #195 from imdouyu/patch-1

Update tutorial07.md 我需还需要->我们还需要

Created at 1 week ago
pull request closed
Update tutorial07.md 我需还需要->我们还需要
Created at 1 week ago
pull request reopened
Update tutorial07.md 我需还需要->我们还需要
Created at 1 week ago

Update tutorial08.md

Merge pull request #196 from imdouyu/patch-2

Update tutorial08.md

Created at 1 week ago
pull request closed
Update tutorial08.md
Created at 1 week ago
issue comment
Compile errors on SLES/SLED 11.0 compiler

Thank you

Created at 1 month ago

Update allocators.h

Fixing compiler error on older compilers, such as SLED 11.0.

cd rapidjson-master g++ -Wall -m32 -ggdb -Iinclude -O1 ./example/simpledom/simpledom.cpp -o simpledom 2>&1 | tee out.txt

Changed SIZE_MAX to std::numeric_limits<size_t>::max() in code to get rid of SIZE_MAX error.

Update dtoa.h

Fixed DigitGen to use proper suffix for uint64_t numeric types. Change from U suffix to ULL suffix.

On SLED 11.0 compiler, code would not compile.

cd rapidjson-master g++ -Wall -m32 -ggdb -Iinclude -O1 ./example/simpledom/simpledom.cpp -o simpledom 2>&1 | tee out.txt

Created at 1 month ago
pull request closed
Compile errors on SLES/SLED 11.0 compiler

These were minor fixes to code that I believe need to be committed and are safe to commit.

include/rapidjson/internal/dtoa.h

in DigitGen function, use ULL suffix to uint64_t numeric constants

    static const uint64_t kPow10[] = { 1ULL, 10ULL, 100ULL, 1000ULL, 10000ULL, 100000ULL, 1000000ULL, 10000000ULL, 100000000ULL,
                                   1000000000ULL, 10000000000ULL, 100000000000ULL, 1000000000000ULL,
                                   10000000000000ULL, 100000000000000ULL, 1000000000000000ULL,
                                   10000000000000000ULL, 100000000000000000ULL, 1000000000000000000ULL,
                                   10000000000000000000ULL };

include/rapidjson/allocators.h

#include ...

template<typename T, typename A> inline T* Realloc(A& a, T* old_p, size_t old_n, size_t new_n) { //RAPIDJSON_NOEXCEPT_ASSERT(old_n <= SIZE_MAX / sizeof(T) && new_n <= SIZE_MAX / sizeof(T)); RAPIDJSON_NOEXCEPT_ASSERT(old_n <= std::numeric_limits<size_t>::max() / sizeof(T) && new_n <= std::numeric_limits<size_t>::max() / sizeof(T)); return static_cast<T*>(a.Realloc(old_p, old_n * sizeof(T), new_n * sizeof(T))); }

The other alternative to this code change would be the following. It's likely that some header defined __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS before stdint.h was included. Compiling on Linux with g++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS a.cpp should fix this issue on the older compilers.

There are other areas of code that need fixing to compile with SLES/SLED 11.0 compiler.

On line 1247 in Document.h, I had to make this manual change.

template GenericValue& operator[](const GenericValue<Encoding, SourceAllocator>& name) { ... #elif defined(GNUC) || defined(clang) // This will generate -Wexit-time-destructors in clang, but that's // better than having under-alignment. //__thread static GenericValue buffer;
static GenericValue buffer; // 2022-08-19 JWW return buffer;

but I cannot commit this change as it would effect others on different compilers. I do not know the correct fix for this, except by what I did. The #elif statement needs an additional test to it.

There is one other error that needs fixing to compile on SLES/SLED 11.0.

I also had to use -fpermissive compiler option as well to get rid of this error: "cannot begin a template-argument list"

I would like to be able to compile without using -fpermissive

Somewhere in the code, a template construct needs to be re-written as older compilers are more restrictive. Later compilers relaxed that constraint.

Solution: Add a whitespace between < and :

Currently, compiling using these compiler options to build an executable.

cd rapidjson-master g++ -Wall -m32 -ggdb -Iinclude -O1 -fpermissive ./example/simpledom/simpledom.cpp -o simpledom 2>&1 | tee out.txt

Created at 1 month ago
issue comment
Crash if a nested array doesn't exist

You need to check the document about how to use Pointer. Pointer can be resolved on Value (not only Document root). For example, after iteration, you get an v of Value&, you can get a descendent by resolving a Pointer on v.

Created at 1 month ago
issue comment
Crash if a nested array doesn't exist

Seems Pointer is a good fit for this.

Created at 1 month ago
opened issue
Generate SVG work for both light and dark theme

Currently the output SVG grpahics has white background and black lines/text. They look a bit odd in a dark theme rustdoc. Hope it can use some style class of the HTML to make it fit for light and dark theme. I am not very familiar with HTML/CSS/SVG, not sure if this is possible.

Created at 1 month ago

docs: fix simple typo, perecent -> percent

There is a small typo in test/unittest/pointertest.cpp.

Should read percent rather than perecent.

Signed-off-by: Tim Gates tim.gates@iress.com

Created at 2 months ago
pull request closed
docs: fix simple typo, perecent -> percent

There is a small typo in test/unittest/pointertest.cpp.

Should read percent rather than perecent.

Semi-automated pull request generated by https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md

Created at 2 months ago
issue comment
make时 报错 基类‘struct rapidjson::internal::BoolType<true>’有一个非虚析构函数

I don't think it is really an error. It should be by design. May need to use pragma to turn off warning for the case.

Created at 2 months ago