Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cJSON_CreateNumber 没有定义 #65

Open
tigertall opened this issue Sep 4, 2024 · 4 comments
Open

cJSON_CreateNumber 没有定义 #65

tigertall opened this issue Sep 4, 2024 · 4 comments

Comments

@tigertall
Copy link

cjson.h 中,cJSON_CreateNumber 没有定义,如果使用了 cJSON_AddNumberToObject,无法编译

#define cJSON_AddNumberToObject(object,name,n) cJSON_AddItemToObject(object, name, cJSON_CreateNumber(n))

@Bwar
Copy link
Owner

Bwar commented Sep 6, 2024

CJsonObject 中未使用 cJSON_AddNumberToObject,这个函数应该是在其他版本的cjson中才有

@tigertall
Copy link
Author

CJsonObject 中未使用 cJSON_AddNumberToObject,这个函数应该是在其他版本的cjson中才有

是的,然后因为这里有了这个定义,可能会导致不小心使用到,实际上宏展开后就无法编译,能否保持行为一致。同步增加下cJSON_AddNumberToObject 的定义实现,或者删除 cJSON_AddNumberToObject 宏。

@Bwar
Copy link
Owner

Bwar commented Sep 14, 2024

OK,这个周末更新一下

@Bwar
Copy link
Owner

Bwar commented Sep 17, 2024

已修改

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants