]>
granicus.if.org Git - json-c/log
Björn Esser [Wed, 13 Dec 2017 18:22:52 +0000 (19:22 +0100)]
json_object: Avoid invalid free (and thus a segfault) when ref_count gets < 0
Eric Haszlakiewicz [Thu, 14 Dec 2017 03:03:20 +0000 (22:03 -0500)]
Merge pull request #386 from besser82/bugfix/aclocal_amflags
Makefile: Add ACLOCAL_AMFLAGS
Eric Haszlakiewicz [Thu, 14 Dec 2017 02:51:13 +0000 (21:51 -0500)]
Merge pull request #391 from rikardfalkeborn/fix-const-function-define
Fix non-GNUC define for JSON_C_CONST_FUNCTION
Rikard Falkeborn [Wed, 13 Dec 2017 21:24:50 +0000 (22:24 +0100)]
Fix non-GNUC define for JSON_C_CONST_FUNCTION
Björn Esser [Sun, 10 Dec 2017 15:29:41 +0000 (16:29 +0100)]
Makefile: Add ACLOCAL_AMFLAGS
This is recommended by the libtool manual.
Eric Haszlakiewicz [Tue, 12 Dec 2017 23:26:51 +0000 (18:26 -0500)]
Apply gcc's "const" attribute to the json_c_object_sizeof() function as an optimizer hint. Also, rename that function from json_object_sizeof().
Eric Haszlakiewicz [Tue, 12 Dec 2017 23:14:40 +0000 (18:14 -0500)]
Merge pull request #388 from besser82/enhancement/json_object_sizeof
json_object: Add size_t json_object_sizeof()
Eric Haszlakiewicz [Tue, 12 Dec 2017 14:13:36 +0000 (09:13 -0500)]
Merge pull request #387 from LeSpocky/doc
doc: Use other doxygen feature to specify mainpage
Björn Esser [Mon, 11 Dec 2017 11:55:40 +0000 (12:55 +0100)]
json_object: Add size_t json_object_sizeof()
Alexander Dahl [Mon, 11 Dec 2017 08:46:28 +0000 (09:46 +0100)]
doc: Use other doxygen feature to specify mainpage
Previously a special tag was added to README.md to make this the
main page in Doxygen generated docs. When viewing the README on the
GitHub page this tag was not hidden.
After upgrading to Doxygen 1.8.8 (and above) in changeset
219025727dd7d981cf2fea7f2095570924e7bae7 a new Doxygen feature can be
used to specify the main page: Since release 1.8.3 Doxygen has a special
option to set a markdown file as main page. When using this option we
can drop the tag, making the README rendered by GitHub nice to look at.
Fixes: ae66b243690871f2daea5ae4b2a4669081d7c556
Eric Haszlakiewicz [Sun, 10 Dec 2017 05:27:01 +0000 (00:27 -0500)]
Remove the previously deprecated lh_table_lookup() function, in favor of lh_table_lookup_ex().
Eric Haszlakiewicz [Sun, 10 Dec 2017 05:25:00 +0000 (00:25 -0500)]
Remove the previously deprecated bits.h and the lh_abort() function.
Eric Haszlakiewicz [Sat, 9 Dec 2017 20:12:08 +0000 (15:12 -0500)]
Drop mention of README-WIN32.html in the release checklist.
Eric Haszlakiewicz [Sat, 9 Dec 2017 19:59:48 +0000 (14:59 -0500)]
Update the master branch to version 0.13.99
Eric Haszlakiewicz [Sat, 9 Dec 2017 19:59:05 +0000 (14:59 -0500)]
Tweak the release checklist slightly to fix problems noticed during this past release process.
Eric Haszlakiewicz [Thu, 7 Dec 2017 23:24:08 +0000 (18:24 -0500)]
Don't include private headers when installing.
Eric Haszlakiewicz [Thu, 7 Dec 2017 04:56:23 +0000 (23:56 -0500)]
Undeprecate the array_list, lh_table and printbuf typedefs, but move each to the corresponding header files.
Eric Haszlakiewicz [Thu, 7 Dec 2017 04:53:12 +0000 (23:53 -0500)]
Squash doxygen warnings, and make a few slight improvements to the docs.
Eric Haszlakiewicz [Wed, 6 Dec 2017 05:27:53 +0000 (00:27 -0500)]
Upgrade doxygen's Doxyfile to version 1.8.8
Eric Haszlakiewicz [Wed, 6 Dec 2017 05:20:59 +0000 (00:20 -0500)]
Add a brief overview of each file to the docs.
Eric Haszlakiewicz [Tue, 5 Dec 2017 23:25:03 +0000 (18:25 -0500)]
Adjust the description of json_object_iterator a bit.
Eric Haszlakiewicz [Tue, 5 Dec 2017 23:01:43 +0000 (18:01 -0500)]
Rearrange README.md a bit and make it work better in the doxygen generated docs.
Also, add a table of contents, and a brief section on using json-c with links to
the header files most likely to be useful.
Eric Haszlakiewicz [Tue, 5 Dec 2017 23:00:09 +0000 (18:00 -0500)]
Add a couple more issues to the list of those closed for 0.13
Eric Haszlakiewicz [Tue, 5 Dec 2017 14:20:59 +0000 (09:20 -0500)]
Deprecated a few typedefs, add docs on json_object_iter, move json_number_chars and json_hex-chars to json_object_private.h.
Eric Haszlakiewicz [Tue, 5 Dec 2017 04:32:12 +0000 (04:32 +0000)]
Cast to int64_t instead of long in test_int_add to fix the test on 32-bit platforms.
Eric Haszlakiewicz [Tue, 5 Dec 2017 04:29:36 +0000 (04:29 +0000)]
Add cast to int on tolower() to fix warnings about array subscripts.
Eric Haszlakiewicz [Mon, 4 Dec 2017 23:17:52 +0000 (18:17 -0500)]
Make sure to include the "*" on function pointer arguments to avoid a warnings from VS2015. See also PR#384.
Eric Haszlakiewicz [Mon, 4 Dec 2017 23:11:09 +0000 (18:11 -0500)]
Merge pull request #384 from ssrlive/patch-1
Fix a VS 2015 compiler warning.
ssrlive [Mon, 4 Dec 2017 06:46:41 +0000 (14:46 +0800)]
Update json_object.c
ssrlive [Mon, 4 Dec 2017 06:43:25 +0000 (14:43 +0800)]
Fix a VS 2015 compiler warning.
In VS 2015, the warning text is "warning C4550: expression evaluates to a function which is missing an argument list".
Eric Haszlakiewicz [Sun, 3 Dec 2017 03:13:22 +0000 (22:13 -0500)]
Add a change log entry for the upcoming 0.13 release.
Eric Haszlakiewicz [Thu, 30 Nov 2017 23:10:25 +0000 (18:10 -0500)]
Clean up *.vg.out files too to "make distcheck" works.
Eric Haszlakiewicz [Thu, 30 Nov 2017 04:35:38 +0000 (23:35 -0500)]
In json_object_deep_copy(), copy over _userdata, at least for json_type_string's with the default serializer set, and provide a way for people using custom serializers to provide a custom shallow_copy method.
Eric Haszlakiewicz [Wed, 29 Nov 2017 22:57:51 +0000 (17:57 -0500)]
Always build the json_object_deep_copy() code, but conditionalize running it on a --benchmark command line option.
Eric Haszlakiewicz [Wed, 29 Nov 2017 14:25:11 +0000 (09:25 -0500)]
Rename _set_last_err() to _json_c_set_last_err().
Eric Haszlakiewicz [Wed, 29 Nov 2017 14:13:32 +0000 (09:13 -0500)]
Merge branch 'commodo-json_deep_copy'
Eric Haszlakiewicz [Wed, 29 Nov 2017 14:12:59 +0000 (09:12 -0500)]
Merge branch 'json_deep_copy' of https://github.com/commodo/json-c into commodo-json_deep_copy
Eric Haszlakiewicz [Mon, 27 Nov 2017 22:57:36 +0000 (17:57 -0500)]
Rename json_object_add_int() to json_object_int_inc() and eliminate the "int64" variant since we store 64-bit values internally anyway.
Alexandru Ardelean [Fri, 16 Jun 2017 07:50:49 +0000 (10:50 +0300)]
tests: add test_deep_copy test
Seems to perform better than outputting to string
and re-parsing it.
BENCHMARK -
1000000 iterations of 'dst2 = json_tokener_parse(json_object_get_string(src2))' took 20 seconds
BENCHMARK -
1000000 iterations of 'dst2 = json_tokener_parse(json_object_get_string(src2))' took 7 seconds
It should make a difference on embedded systems.
The test was performed on a i5 desktop CPU [~3.5 years of age].
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Alexandru Ardelean [Fri, 16 Jun 2017 07:05:32 +0000 (10:05 +0300)]
json_object: implement json_object_deep_copy()
Because doing `json_tokener_parse(json_object_get_string(src))`
feels sloppy, dirty, and makes me want to cry at night
sometimes.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Eric Haszlakiewicz [Mon, 27 Nov 2017 14:06:39 +0000 (09:06 -0500)]
Merge pull request #363 from jvijtiuk/integer_addition
Issue #338, add json_object_add_int functions
Eric Haszlakiewicz [Mon, 27 Nov 2017 13:48:08 +0000 (08:48 -0500)]
Update test_parse.expected to match the code.
Eric Haszlakiewicz [Mon, 27 Nov 2017 05:20:11 +0000 (00:20 -0500)]
Rewrite the json_tokener_state_inf handling in json_tokener to be simpler, and avoid needless copying of the input into a temporary buffer.
Eric Haszlakiewicz [Mon, 27 Nov 2017 05:18:55 +0000 (00:18 -0500)]
Add a few more tests to the partial parse to cover bytes after "Infinity".
Eric Haszlakiewicz [Mon, 27 Nov 2017 05:08:59 +0000 (00:08 -0500)]
Save proper expected output for test_parse from the previous commit.
Eric Haszlakiewicz [Mon, 27 Nov 2017 05:04:33 +0000 (00:04 -0500)]
Fix parsing of "-Infinity" when the "-" and "Infinity" are split across multiple calls.
Add several additional test cases for partial parsing of infinity values.
Eric Haszlakiewicz [Mon, 27 Nov 2017 03:42:40 +0000 (22:42 -0500)]
Issue #371: fix parsing of "-Infinity" (although in a somewhat different location than PR#372 used), and add a case to test_parse to check for this.
Eric Haszlakiewicz [Mon, 27 Nov 2017 03:34:43 +0000 (22:34 -0500)]
Add a few extra cases to test_parse to show how trailing bytes are handled, especially for parsing "Infinity".
Eric Haszlakiewicz [Mon, 27 Nov 2017 03:31:48 +0000 (22:31 -0500)]
Rewrite test_basic_parse() to factor out a single_basic_parse() to avoid lots of duplicate boiler plate code.
Also, emit the input string in the output so it's easier to see what's going on.
Eric Haszlakiewicz [Sun, 26 Nov 2017 19:17:17 +0000 (14:17 -0500)]
On VS 2013 and newer, actually use strtoll instead of redefining it to _strtoi64.
Eric Haszlakiewicz [Sun, 26 Nov 2017 19:08:53 +0000 (14:08 -0500)]
Merge pull request #373 from commodo/fix-appveyor-build
build: fix build on appveyor CI
Eric Haszlakiewicz [Sun, 26 Nov 2017 18:57:54 +0000 (13:57 -0500)]
Merge pull request #381 from busterb/fix-makedist
Fix makedist
Brent Cook [Sun, 26 Nov 2017 14:29:45 +0000 (08:29 -0600)]
add/remove missing distribution files
Brent Cook [Sun, 26 Nov 2017 14:26:18 +0000 (08:26 -0600)]
ignore more autoconf goo
Alexandru Ardelean [Tue, 7 Nov 2017 14:50:58 +0000 (16:50 +0200)]
json_util: define `strtoll` as _strtoi64 for MSVC
Got the idea from this blog post:
http://www.enchantedage.com/node/231
Simple & concise stuff :)
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Alexandru Ardelean [Tue, 7 Nov 2017 14:21:52 +0000 (16:21 +0200)]
strerror_override: re-organize strerror_override.h
Always include <string.h> before _json_c_strerror() definition.
Should fix linker issues on MSVC.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Eric Haszlakiewicz [Mon, 23 Oct 2017 02:46:05 +0000 (22:46 -0400)]
Remove out of date win32 build information, and mention the need to use cmake there.
Eric Haszlakiewicz [Mon, 23 Oct 2017 02:28:35 +0000 (22:28 -0400)]
Fix definition of NELEM in the tests.
Eric Haszlakiewicz [Mon, 23 Oct 2017 02:19:41 +0000 (22:19 -0400)]
Issue #370: work around Clang-on-windows oddities by rearranging ifdefs.
Eric Haszlakiewicz [Fri, 20 Oct 2017 03:30:51 +0000 (23:30 -0400)]
Issue #369: note some useful settings when building for Android.
Eric Haszlakiewicz [Mon, 9 Oct 2017 17:16:00 +0000 (13:16 -0400)]
Use cmake to create the json-c.pc file, as suggested by PR#362.
Eric Haszlakiewicz [Wed, 4 Oct 2017 02:50:29 +0000 (22:50 -0400)]
Issue #173, follow up to using strtoll to allow this to work on older Windows environments: Use cmake to generate config.h from config.h.win32, including checking for strtoll with cmake, or fall back to _strtoi64 for older MSVC's.
Also, add a few missing files to the list of sources to build.
Eric Haszlakiewicz [Mon, 18 Sep 2017 01:44:04 +0000 (21:44 -0400)]
The new cmake-generated VS builds now generate a dynamic .dll instead of a .lib
Eric Haszlakiewicz [Mon, 18 Sep 2017 01:35:53 +0000 (21:35 -0400)]
For appveyor builds, json_config.h is actually generated in the "include" directory.
Eric Haszlakiewicz [Mon, 18 Sep 2017 01:27:07 +0000 (21:27 -0400)]
Split the list of cmake headers into public and private ones, and only install the public ones.
Eric Haszlakiewicz [Mon, 18 Sep 2017 01:25:49 +0000 (21:25 -0400)]
Add a "cmake ." line to the appveyor build file to try to get it working again.
Juraj Vijtiuk [Thu, 14 Sep 2017 12:05:33 +0000 (08:05 -0400)]
Add json_object_add_int functions
Eric Haszlakiewicz [Tue, 12 Sep 2017 01:25:27 +0000 (21:25 -0400)]
Merge pull request #361 from schwehr/int64
Fix double to int cast overflow in json_object_get_int64.
Kurt Schwehr [Mon, 11 Sep 2017 14:23:00 +0000 (07:23 -0700)]
Fix double to int cast overflow in json_object_get_int64.
Found with autofuzz in GDAL
Eric Haszlakiewicz [Fri, 8 Sep 2017 02:45:48 +0000 (22:45 -0400)]
Merge pull request #360 from jasonbking/master
Use strtoll() to parse ints
Eric Haszlakiewicz [Fri, 8 Sep 2017 02:22:25 +0000 (22:22 -0400)]
Issue#353: attempt to fix or ignore a few -Wdocumentation messages from Clang.
Eric Haszlakiewicz [Fri, 8 Sep 2017 02:21:29 +0000 (22:21 -0400)]
Issue#353: mark lh_abort as actually deprecated, not just in the docs.
Jason King [Fri, 8 Sep 2017 01:46:06 +0000 (01:46 +0000)]
Add long long 64-bit check
Jason King [Thu, 7 Sep 2017 17:21:14 +0000 (17:21 +0000)]
Use strtoll to parse ints
Eric Haszlakiewicz [Thu, 7 Sep 2017 03:50:03 +0000 (23:50 -0400)]
Remove the Visual Studio project files as they were out of date, and should now be generated by using cmake.
Eric Haszlakiewicz [Thu, 7 Sep 2017 03:40:20 +0000 (23:40 -0400)]
Issue #359: Use consistent spacing in CMakeLists.txt
Eric Haszlakiewicz [Thu, 7 Sep 2017 03:39:23 +0000 (23:39 -0400)]
Issue #359: Don't duplicate lh_get_hash, just omit the "inline" for VS2010.
Eric Haszlakiewicz [Thu, 7 Sep 2017 03:20:36 +0000 (23:20 -0400)]
Merge pull request #359 from Haffon/api-0.12
update CMakeLists.txt for compile with visual studio at least 2010
Haffon [Thu, 7 Sep 2017 02:39:14 +0000 (10:39 +0800)]
set JSON_C_HEADERS full file name
Haffon [Thu, 7 Sep 2017 02:28:26 +0000 (10:28 +0800)]
if compile with vs2015, enable the "static inline" declare.
Haffon [Thu, 7 Sep 2017 02:02:21 +0000 (10:02 +0800)]
rollback api to 0.12
Haffon [Thu, 7 Sep 2017 01:33:07 +0000 (09:33 +0800)]
Merge pull request #2 from json-c/master
merge upstream
Eric Haszlakiewicz [Tue, 5 Sep 2017 05:56:42 +0000 (01:56 -0400)]
Undo a bit of
2d1da5ab : handle per-thread formats for double serialization, even if --enable-threading wasn't specified.
Eric Haszlakiewicz [Tue, 5 Sep 2017 05:53:13 +0000 (01:53 -0400)]
Issue #173: since some sscanf implementations return 0 for non-zero inputs, directly check for "0" in the input.
Eric Haszlakiewicz [Mon, 4 Sep 2017 03:37:12 +0000 (23:37 -0400)]
Add a --enable-threading configure option, and only use the (slower) __sync_add_and_fetch()/__sync_sub_and_fetch() function when it is specified.
Eric Haszlakiewicz [Mon, 4 Sep 2017 02:35:58 +0000 (22:35 -0400)]
Use AC_CONFIG_MACRO_DIRS to specify path to the ax macros instead of passing -I to autoreconf in autogen.sh.
Eric Haszlakiewicz [Sat, 2 Sep 2017 18:48:17 +0000 (14:48 -0400)]
Explicitly check for GCC's atomic functions instead of depending on the __GNUC__ define.
Add a comment mentioning the limitation even though the _ref_count value is hanled atomically.
Eric Haszlakiewicz [Sat, 2 Sep 2017 17:54:15 +0000 (13:54 -0400)]
Merge branch 'pull-211'
This is EmielBruijntes' "Atomic updates for the refcount"
Eric Haszlakiewicz [Thu, 31 Aug 2017 03:35:56 +0000 (23:35 -0400)]
Issue #351: don't redefine SIZE_T_MAX if it's already defined.
Eric Haszlakiewicz [Thu, 31 Aug 2017 03:17:24 +0000 (23:17 -0400)]
Issue #349: none of automake's clean targets are suite for really cleaning up everything, so add a local "really-clean" target that does so.
Haffon [Tue, 29 Aug 2017 16:02:59 +0000 (00:02 +0800)]
Merge pull request #1 from json-c/master
want to merge the original repository
Eric Haszlakiewicz [Fri, 25 Aug 2017 05:15:39 +0000 (01:15 -0400)]
PR#331: for Visual Studio, use a snprintf/vsnprintf wrapper that ensures the string is terminated.
Haffon [Tue, 22 Aug 2017 05:53:47 +0000 (13:53 +0800)]
1.make it can been compiled with Visual Studio 2010
2.replace json_object_get/put API with json_object_retain/release, as they operate the reference counter, and confused with array_list_get/put_idx.
3.replace array_list_get/put_idx API with array_list_get/insert to make them more clear to use.
Eric Haszlakiewicz [Tue, 22 Aug 2017 01:50:58 +0000 (20:50 -0500)]
Merge pull request #346 from schwehr/get_int
Clamp double to int32 when narrowing in json_object_get_int.
Eric Haszlakiewicz [Tue, 22 Aug 2017 01:50:20 +0000 (20:50 -0500)]
Merge pull request #345 from MrAnno/fix-make-dist
Fix make dist and make distcheck
Eric Haszlakiewicz [Tue, 22 Aug 2017 01:39:11 +0000 (20:39 -0500)]
Merge pull request #344 from fastogt/master
Fix Mingw build
Kurt Schwehr [Tue, 8 Aug 2017 14:54:38 +0000 (07:54 -0700)]
Clamp double to int32 when narrowing in json_object_get_int.
Avoids undefined behavior. Found by autofuzz.
László Várady [Fri, 4 Aug 2017 10:26:54 +0000 (12:26 +0200)]
Fix 'make distcheck'
Signed-off-by: László Várady <laszlo.varady@balabit.com>
László Várady [Fri, 4 Aug 2017 09:59:14 +0000 (11:59 +0200)]
Fix 'make dist'
EXTRA_DIST copies the listed directories/files from the _source_ directory
into the distribution.
Since the doc directory does not exist after running autogen + configure
+ make dist, the distribution tarball generation fails.
Note that the dist-hook rule below operates on 'distdir', not on the source
directory where EXTRA_DIST expects the existence of the doc folder.
In summary, even if I removed 'doc' from EXTRA_DIST, the dist tarball will
always contain the documentation (due to the dist-hook rule).
Signed-off-by: László Várady <laszlo.varady@balabit.com>
topilski [Sun, 30 Jul 2017 04:37:17 +0000 (07:37 +0300)]
Fix Mingw build