Bwar / CJsonObject

Ultralightweight JSON parser in C++ based on cJSON
MIT License
648 stars 239 forks source link

建议用标准的整数类型代替 #22

Closed skyformat99 closed 4 years ago

skyformat99 commented 4 years ago

比如,这些都不好

if __WORDSIZE == 64

     typedef long int64;
    typedef unsigned long uint64;
 #else
     typedef int_fast64_t int64;
     typedef uint_fast64_t uint64;
 #endif

else

 typedef long long int64;

都不是标准的,没有可移植性啊; 建议都用 stdint.h里面的标准类型代替: 比如 int64_t uint64_t int32_t uint32_t

等等

bss9395 commented 4 years ago

好的。 我一般不看邮件。 我的手机+86-13611464445。可以给我发短信。 我的另外一个邮箱是brilliantstarrysky9395@outlook.com

On Mon, 17 Aug 2020 at 16:57, skyformat99 notifications@github.com wrote:

比如,这些都不好

if __WORDSIZE == 64

typedef long int64; typedef unsigned long uint64;

else

typedef int_fast64_t int64; typedef uint_fast64_t uint64;

endif

else

typedef long long int64;

都不是标准的,没有可移植性啊; 建议都用 stdint.h里面的标准类型代替: 比如 int64_t uint64_t int32_t uint32_t

等等

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Bwar/CJsonObject/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESTRD4EAQP76AY6CYDM2R3SBDWJHANCNFSM4QBNHRLQ .

-- Sent by 黄志贵

Bwar commented 4 years ago

这个我周末调整一下,之前这样调整过,跟我的另一个重量级项目Nebula有typedef冲突又改回来了。

Bwar commented 4 years ago

done