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

JSON_INTEGER_IS_LONG_LONG is part of API but it differs between cmake & autotools (2.14) #696

Open
ChenQi1989 opened this issue Sep 12, 2024 · 1 comment

Comments

@ChenQi1989
Copy link

I'm working on Yocto project and it's easy for Yocto to switch build system for jansson. The version I use is 2.14.
Then I found that JSON_INTEGER_IS_LONG_LONG differs across different build systems (cmake v.s. autotools).

I can see that there are codes related to this, e.g.,
#ifndef JANSSON_USING_CMAKE /* disabled if using cmake */ #if JSON_INTEGER_IS_LONG_LONG #ifdef _WIN32 #define JSON_INTEGER_FORMAT "I64d" #else #define JSON_INTEGER_FORMAT "lld" #endif typedef long long json_int_t; #else #define JSON_INTEGER_FORMAT "ld" typedef long json_int_t; #endif /* JSON_INTEGER_IS_LONG_LONG */ #endif

But this macro is part of API. We can see this from the doc/apiref.rst.

So if this macro is part of API, then IMHO it should not differ merely because the build system changes.

There's a commit in master branch, 8b975ab (Use dtoa for double to string conversion), that adds JSON_INTEGER_IS_LONG_LONG for cmake. So after this commit, this macro start to become consistent across different build systems.

I have three questions (sorry if that's too many):

  1. What's the maintenance attitude towards JSON_INTEGER_IS_LONG_LONG macro? Should it remains as part of API and keeps consistent across different build systems?
  2. With 8b975ab, should we remove the above JASSON_USING_CMAKE code block?
  3. There's 2.13 branch, but there's no 2.14 branch. Should we create 2.14 branch and extract part of 8b975ab (the JSON_INTEGER_IS_LONG_LONG part) and put it in the 2.14 branch?
@ChenQi1989
Copy link
Author

ping @akheron

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

1 participant