]> git.ipfire.org Git - thirdparty/json-c.git/log
thirdparty/json-c.git
2 years agoMerge pull request #625 from besser82/topic/besser82/json-c-0.13/rdrand_fixes json-c-0.13
Eric Hawicz [Wed, 28 Jun 2023 22:01:58 +0000 (18:01 -0400)] 
Merge pull request #625 from besser82/topic/besser82/json-c-0.13/rdrand_fixes

json-c-0.13.x: Detect broken RDRAND during initialization.

5 years agoIssue #626: Restore compatibility with cmake 2.8 by explicitly defining the PROJECT_V...
Eric Haszlakiewicz [Sat, 30 May 2020 19:36:54 +0000 (19:36 +0000)] 
Issue #626: Restore compatibility with cmake 2.8 by explicitly defining the PROJECT_VERSION* variables.

(cherry picked from commit fe308b886248b1a5fa610b04c9871907f80de3d2)

5 years agoDetect broken RDRAND during initialization. 625/head
Björn Esser [Mon, 25 May 2020 11:01:18 +0000 (13:01 +0200)] 
Detect broken RDRAND during initialization.

Some CPUs advertise RDRAND in CPUID, but return
0xFFFFFFFF unconditionally.  To avoid locking up
later, test RDRAND during initialization, and if
it returns 0xFFFFFFFF, mark it as nonexistent.

Also fix a possible segmentation fault in CPUID check.

This commit is a squashed and slightly modified backport
of the following commits on the master branch:

  * 0e5bbcaa162ac7850eb4fcd8f91391837d0efb50
  * 4d36b0287d3ab0912ba8a4790340ca099960b2b0
  * 80863140263be5f2dc630938ed8f0066f8a1ab43

5 years agoApply the fix from @pointbre in issue #626 to skip "inline" on AIX, but invert the...
Eric Haszlakiewicz [Sun, 31 May 2020 03:22:14 +0000 (03:22 +0000)] 
Apply the fix from @pointbre in issue #626 to skip "inline" on AIX, but invert the test to make it a little easier to understand.

(cherry picked from commit 1c6086a86aa26c643a0c9e8bc4a1f7d652b33662)

5 years agoMerge pull request #607 from besser82/topic/besser82/json-c-0.13/CVE-2020-12762
Eric Hawicz [Thu, 14 May 2020 15:23:40 +0000 (11:23 -0400)] 
Merge pull request #607 from besser82/topic/besser82/json-c-0.13/CVE-2020-12762

json-c-0.13.x: Fix CVE-2020-12762 - json-c through 0.14 has an integer overflow and out-of-bounds write ...

5 years agoFix CVE-2020-12762. 607/head
Björn Esser [Thu, 14 May 2020 10:32:30 +0000 (12:32 +0200)] 
Fix CVE-2020-12762.

This commit is a squashed backport of the following commits
on the master branch:

  * 099016b7e8d70a6d5dd814e788bba08d33d48426
  * 77d935b7ae7871a1940cd827e850e6063044ec45
  * d07b91014986900a3a75f306d302e13e005e9d67
  * 519dfe1591d85432986f9762d41d1a883198c157
  * a59d5acfab4485d5133114df61785b1fc633e0c6

6 years agoinstall json_object_iterator.h header file 514/head
Eric Haszlakiewicz [Wed, 12 Dec 2018 01:35:56 +0000 (20:35 -0500)] 
install json_object_iterator.h header file

When building the project using cmake then installing it.  The
definitions in `json_object_iterator.h` are required but not installed
by the cmake install rule.  This patch adds the `json_object_iterator.h`
file to the list of files to install.

Signed-off-by: Keith Holman <keith.holman@windriver.com>
7 years agoinstall json_object_iterator.h header file 421/head
Keith Holman [Thu, 7 Jun 2018 17:19:27 +0000 (13:19 -0400)] 
install json_object_iterator.h header file

When building the project using cmake then installing it.  The
definitions in `json_object_iterator.h` are required but not installed
by the cmake install rule.  This patch adds the `json_object_iterator.h`
file to the list of files to install.

Signed-off-by: Keith Holman <keith.holman@windriver.com>
7 years agoMerge pull request #420 from angelskieglazki/master
Eric Haszlakiewicz [Sun, 3 Jun 2018 03:01:04 +0000 (23:01 -0400)] 
Merge pull request #420 from angelskieglazki/master

arraylist: Fixed names of parameters for callback function

7 years agoarraylist: Fix names of parameters for callback function 420/head
max [Fri, 1 Jun 2018 15:21:06 +0000 (18:21 +0300)] 
arraylist: Fix names of parameters for callback function

7 years agoAlways create debug info (pdb file) even for release builds.
Eric Haszlakiewicz [Mon, 28 May 2018 01:50:57 +0000 (21:50 -0400)] 
Always create debug info (pdb file) even for release builds.

7 years agoTry the appveyor changes again, using %Configuration% instead of "Debug"
Eric Haszlakiewicz [Sun, 27 May 2018 22:20:32 +0000 (18:20 -0400)] 
Try the appveyor changes again, using %Configuration% instead of "Debug"

7 years agoInclude the json-c.lib, .pdb and .exp files in the zip file created by the appveyor...
Eric Haszlakiewicz [Sun, 27 May 2018 20:07:11 +0000 (16:07 -0400)] 
Include the json-c.lib, .pdb and .exp files in the zip file created by the appveyor build, since it seems they're needed for linking and debugging.

7 years agoMerge pull request #410 from janczer/fix-typos
Eric Haszlakiewicz [Wed, 25 Apr 2018 02:01:09 +0000 (22:01 -0400)] 
Merge pull request #410 from janczer/fix-typos

Fixed typos

7 years agoFixed typos 410/head
janczer [Tue, 24 Apr 2018 14:00:38 +0000 (16:00 +0200)] 
Fixed typos

7 years agoIssue #407: fix incorrect casts in calls to ctype functions (isdigit and isspace...
Eric Haszlakiewicz [Sun, 25 Mar 2018 22:25:58 +0000 (18:25 -0400)] 
Issue #407: fix incorrect casts in calls to ctype functions (isdigit and isspace) so we don't crash when asserts are enabled on certain platforms and characters > 128 are parsed.

7 years agoAdd an parse test for content starting with a UTF8 BOM, which is _not_ a valid start...
Eric Haszlakiewicz [Sun, 25 Mar 2018 22:23:42 +0000 (18:23 -0400)] 
Add an parse test for content starting with a UTF8 BOM, which is _not_ a valid start to a JSON message.

7 years agoUpdate docs for the 0.13.1 release. json-c-0.13.1-20180305
Eric Haszlakiewicz [Tue, 6 Mar 2018 04:18:59 +0000 (23:18 -0500)] 
Update docs for the 0.13.1 release.

7 years agoBump version to 0.13.1, and re-generate autoconf and automake files.
Eric Haszlakiewicz [Tue, 6 Mar 2018 04:16:43 +0000 (23:16 -0500)] 
Bump version to 0.13.1, and re-generate autoconf and automake files.

7 years agoEliminate ACLOCAL_AMFLAGS, since it changes how libtool files are generated too signi...
Eric Haszlakiewicz [Tue, 6 Mar 2018 04:14:57 +0000 (23:14 -0500)] 
Eliminate ACLOCAL_AMFLAGS, since it changes how libtool files are generated too significantly.

7 years agoUpdate the change log for the 0.13.1 release.
Eric Haszlakiewicz [Tue, 6 Mar 2018 03:54:57 +0000 (22:54 -0500)] 
Update the change log for the 0.13.1 release.

Conflicts:
ChangeLog

7 years agoUpdate the change log for the 0.13.1 release.
Eric Haszlakiewicz [Tue, 6 Mar 2018 03:54:57 +0000 (22:54 -0500)] 
Update the change log for the 0.13.1 release.

7 years agoIssue #396: check for toolchain compatibilty with _REENTRANT before adding it to...
Eric Haszlakiewicz [Mon, 5 Mar 2018 03:32:45 +0000 (22:32 -0500)] 
Issue #396: check for toolchain compatibilty with _REENTRANT before adding it to CFLAGS.

7 years agopull in fuzzers, add CI scripts later
Chris Wolfe [Tue, 6 Feb 2018 01:24:51 +0000 (19:24 -0600)] 
pull in fuzzers, add CI scripts later

Conflicts:
ChangeLog

7 years agoAvoid uninitialized variable warnings
Jonathan Wiens [Wed, 17 Jan 2018 14:57:52 +0000 (15:57 +0100)] 
Avoid uninitialized variable warnings

Fix json_object_object_foreach to avoid uninitialized variable warnings
using ANSI C or MSC.

7 years agoIssue #396: check for toolchain compatibilty with _REENTRANT before adding it to...
Eric Haszlakiewicz [Mon, 5 Mar 2018 03:32:45 +0000 (22:32 -0500)] 
Issue #396: check for toolchain compatibilty with _REENTRANT before adding it to CFLAGS.

7 years agoMerge pull request #402 from derwolfe/fuzz
Eric Haszlakiewicz [Mon, 19 Feb 2018 18:54:18 +0000 (13:54 -0500)] 
Merge pull request #402 from derwolfe/fuzz

Add fuzzers from OSS-Fuzz

7 years agopull in fuzzers, add CI scripts later 402/head
Chris Wolfe [Tue, 6 Feb 2018 01:24:51 +0000 (19:24 -0600)] 
pull in fuzzers, add CI scripts later

7 years agoMerge pull request #399 from jonathan-wiens/bugfix/initialize_variable
Eric Haszlakiewicz [Sat, 27 Jan 2018 04:46:33 +0000 (23:46 -0500)] 
Merge pull request #399 from jonathan-wiens/bugfix/initialize_variable

Avoid uninitialized variable warnings

7 years agoAvoid uninitialized variable warnings 399/head
Jonathan Wiens [Wed, 17 Jan 2018 14:57:52 +0000 (15:57 +0100)] 
Avoid uninitialized variable warnings

Fix json_object_object_foreach to avoid uninitialized variable warnings
using ANSI C or MSC.

7 years agoBump the major version of the .so library generated up to 4.0 to avoid conflicts...
Eric Haszlakiewicz [Tue, 16 Jan 2018 04:31:55 +0000 (23:31 -0500)] 
Bump the major version of the .so library generated up to 4.0 to avoid conflicts because some downstream packagers of json-c had already done their own bump to ".so.3" for a much older 0.12 release.

7 years agoBump the major version of the .so library generated up to 4.0 to avoid conflicts...
Eric Haszlakiewicz [Tue, 16 Jan 2018 04:31:55 +0000 (23:31 -0500)] 
Bump the major version of the .so library generated up to 4.0 to avoid conflicts because some downstream packagers of json-c had already done their own bump to ".so.3" for a much older 0.12 release.

7 years agoPR#394: fix breakage with VS build.
Eric Haszlakiewicz [Sun, 24 Dec 2017 19:42:58 +0000 (14:42 -0500)] 
PR#394: fix breakage with VS build.

7 years agoPR#394: don't always append the ".0" if the double value rounds to zero because some...
Eric Haszlakiewicz [Sun, 24 Dec 2017 18:45:52 +0000 (13:45 -0500)] 
PR#394: don't always append the ".0" if the double value rounds to zero because some custom formats *will* include it (e.g. %.2f).
Also try to accomodate formats to explicitly exclude the decimal (e.g. %.0f).

7 years agoPR#394: fix breakage with VS build.
Eric Haszlakiewicz [Sun, 24 Dec 2017 19:42:58 +0000 (14:42 -0500)] 
PR#394: fix breakage with VS build.

7 years agoPR#394: don't always append the ".0" if the double value rounds to zero because some...
Eric Haszlakiewicz [Sun, 24 Dec 2017 18:45:52 +0000 (13:45 -0500)] 
PR#394: don't always append the ".0" if the double value rounds to zero because some custom formats *will* include it (e.g. %.2f).
Also try to accomodate formats to explicitly exclude the decimal (e.g. %.0f).

7 years agoRemove the TRUE and FALSE defines.
Eric Haszlakiewicz [Sat, 23 Dec 2017 14:42:17 +0000 (09:42 -0500)] 
Remove the TRUE and FALSE defines.

7 years agoMerge pull request #393 from besser82/enhancement/unsigned_refcount
Eric Haszlakiewicz [Sun, 17 Dec 2017 14:52:27 +0000 (09:52 -0500)] 
Merge pull request #393 from besser82/enhancement/unsigned_refcount

json_object_private: Use unsigned 32-bit integer type for refcount

7 years agojson_object_private: Use unsigned 32-bit integer type for refcount 393/head
Björn Esser [Sat, 16 Dec 2017 16:09:39 +0000 (17:09 +0100)] 
json_object_private: Use unsigned 32-bit integer type for refcount

7 years agoMerge pull request #392 from besser82/json-c-0.13
Eric Haszlakiewicz [Thu, 14 Dec 2017 22:25:53 +0000 (17:25 -0500)] 
Merge pull request #392 from besser82/json-c-0.13

json_object: Avoid invalid free (and thus a segfault) when ref_count gets < 0

7 years agoMakefile: Add ACLOCAL_AMFLAGS 392/head
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.

7 years agojson_object: Avoid invalid free (and thus a segfault) when ref_count gets < 0
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

7 years agoMerge pull request #389 from besser82/bugfix/invalid_free
Eric Haszlakiewicz [Thu, 14 Dec 2017 14:28:06 +0000 (09:28 -0500)] 
Merge pull request #389 from besser82/bugfix/invalid_free

json_object: Avoid double free (and thus a segfault) when ref_count gets < 0

7 years agojson_object: Avoid invalid free (and thus a segfault) when ref_count gets < 0 389/head
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

7 years agoFix 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

7 years agoMerge pull request #390 from besser82/json-c-0.13
Eric Haszlakiewicz [Thu, 14 Dec 2017 03:03:51 +0000 (22:03 -0500)] 
Merge pull request #390 from besser82/json-c-0.13

json_object: Add const size_t json_c_object_sizeof()

7 years agoMerge pull request #386 from besser82/bugfix/aclocal_amflags
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

7 years agoMerge pull request #391 from rikardfalkeborn/fix-const-function-define
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

7 years agoFix non-GNUC define for JSON_C_CONST_FUNCTION 391/head
Rikard Falkeborn [Wed, 13 Dec 2017 21:24:50 +0000 (22:24 +0100)] 
Fix non-GNUC define for JSON_C_CONST_FUNCTION

7 years agoApply gcc's "const" attribute to the json_c_object_sizeof() function as an optimizer... 390/head
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().

7 years agojson_object: Add size_t json_object_sizeof()
Björn Esser [Mon, 11 Dec 2017 11:55:40 +0000 (12:55 +0100)] 
json_object: Add size_t json_object_sizeof()

7 years agoMakefile: Add ACLOCAL_AMFLAGS 386/head
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.

7 years agoApply gcc's "const" attribute to the json_c_object_sizeof() function as an optimizer...
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().

7 years agoMerge pull request #388 from besser82/enhancement/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()

7 years agoMerge pull request #387 from LeSpocky/doc
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

7 years agojson_object: Add size_t json_object_sizeof() 388/head
Björn Esser [Mon, 11 Dec 2017 11:55:40 +0000 (12:55 +0100)] 
json_object: Add size_t json_object_sizeof()

7 years agodoc: Use other doxygen feature to specify mainpage 387/head
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
7 years agoRemove the previously deprecated lh_table_lookup() function, in favor of lh_table_loo...
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().

7 years agoRemove the previously deprecated bits.h and the lh_abort() function.
Eric Haszlakiewicz [Sun, 10 Dec 2017 05:25:00 +0000 (00:25 -0500)] 
Remove the previously deprecated bits.h and the lh_abort() function.

7 years agoDrop mention of README-WIN32.html in the release checklist.
Eric Haszlakiewicz [Sat, 9 Dec 2017 20:12:08 +0000 (15:12 -0500)] 
Drop mention of README-WIN32.html in the release checklist.

7 years agoUpdate the master branch to version 0.13.99
Eric Haszlakiewicz [Sat, 9 Dec 2017 19:59:48 +0000 (14:59 -0500)] 
Update the master branch to version 0.13.99

7 years agoTweak the release checklist slightly to fix problems noticed during this past release...
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.

7 years agoRegenerate Makefile.in with private headers excluded from install. json-c-0.13-20171207
Eric Haszlakiewicz [Thu, 7 Dec 2017 23:28:34 +0000 (18:28 -0500)] 
Regenerate Makefile.in with private headers excluded from install.

7 years agoMerge d447fbc from master to json-c-0.13, to avoid installing private headers.
Eric Haszlakiewicz [Thu, 7 Dec 2017 23:24:39 +0000 (18:24 -0500)] 
Merge d447fbc from master to json-c-0.13, to avoid installing private headers.

7 years agoDon't include private headers when installing.
Eric Haszlakiewicz [Thu, 7 Dec 2017 23:24:08 +0000 (18:24 -0500)] 
Don't include private headers when installing.

7 years agoAdd generated docs for the 0.13 release.
Eric Haszlakiewicz [Thu, 7 Dec 2017 23:06:19 +0000 (18:06 -0500)] 
Add generated docs for the 0.13 release.

7 years agoSave autoconf/automake generated files for the new 0.13 release.
Eric Haszlakiewicz [Thu, 7 Dec 2017 23:05:30 +0000 (18:05 -0500)] 
Save autoconf/automake generated files for the new 0.13 release.

7 years agoBump the version up to 0.13
Eric Haszlakiewicz [Thu, 7 Dec 2017 23:03:29 +0000 (18:03 -0500)] 
Bump the version up to 0.13

7 years agoUndeprecate the array_list, lh_table and printbuf typedefs, but move each to the...
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.

7 years agoSquash doxygen warnings, and make a few slight improvements to the docs.
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.

7 years agoUpgrade doxygen's Doxyfile to version 1.8.8
Eric Haszlakiewicz [Wed, 6 Dec 2017 05:27:53 +0000 (00:27 -0500)] 
Upgrade doxygen's Doxyfile to version 1.8.8

7 years agoAdd a brief overview of each file to the docs.
Eric Haszlakiewicz [Wed, 6 Dec 2017 05:20:59 +0000 (00:20 -0500)] 
Add a brief overview of each file to the docs.

7 years agoAdjust the description of json_object_iterator a bit.
Eric Haszlakiewicz [Tue, 5 Dec 2017 23:25:03 +0000 (18:25 -0500)] 
Adjust the description of json_object_iterator a bit.

7 years agoRearrange README.md a bit and make it work better in the doxygen generated docs.
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.

7 years agoAdd a couple more issues to the list of those closed for 0.13
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

7 years agoDeprecated a few typedefs, add docs on json_object_iter, move json_number_chars and...
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.

7 years agoCast 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: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.

7 years agoAdd cast to int on tolower() to fix warnings about array subscripts.
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.

7 years agoMake sure to include the "*" on function pointer arguments to avoid a warnings from...
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.

7 years agoMerge pull request #384 from ssrlive/patch-1
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.

7 years agoUpdate json_object.c 384/head
ssrlive [Mon, 4 Dec 2017 06:46:41 +0000 (14:46 +0800)] 
Update json_object.c

7 years agoFix a VS 2015 compiler warning.
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".

7 years agoAdd a change log entry for the upcoming 0.13 release.
Eric Haszlakiewicz [Sun, 3 Dec 2017 03:13:22 +0000 (22:13 -0500)] 
Add a change log entry for the upcoming 0.13 release.

7 years agoClean up *.vg.out files too to "make distcheck" works.
Eric Haszlakiewicz [Thu, 30 Nov 2017 23:10:25 +0000 (18:10 -0500)] 
Clean up *.vg.out files too to "make distcheck" works.

7 years agoIn json_object_deep_copy(), copy over _userdata, at least for json_type_string's...
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.

7 years agoAlways build the json_object_deep_copy() code, but conditionalize running it on a...
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.

7 years agoRename _set_last_err() to _json_c_set_last_err().
Eric Haszlakiewicz [Wed, 29 Nov 2017 14:25:11 +0000 (09:25 -0500)] 
Rename _set_last_err() to _json_c_set_last_err().

7 years agoMerge branch 'commodo-json_deep_copy'
Eric Haszlakiewicz [Wed, 29 Nov 2017 14:13:32 +0000 (09:13 -0500)] 
Merge branch 'commodo-json_deep_copy'

7 years agoMerge branch 'json_deep_copy' of https://github.com/commodo/json-c into commodo-json_...
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

7 years agoRename json_object_add_int() to json_object_int_inc() and eliminate the "int64" varia...
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.

7 years agotests: add test_deep_copy test 328/head
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>
7 years agojson_object: implement json_object_deep_copy()
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>
7 years agoMerge pull request #363 from jvijtiuk/integer_addition
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

7 years agoUpdate test_parse.expected to match the code.
Eric Haszlakiewicz [Mon, 27 Nov 2017 13:48:08 +0000 (08:48 -0500)] 
Update test_parse.expected to match the code.

7 years agoRewrite the json_tokener_state_inf handling in json_tokener to be simpler, and avoid...
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.

7 years agoAdd a few more tests to the partial parse to cover bytes after "Infinity".
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".

7 years agoSave proper expected output for test_parse from the previous commit.
Eric Haszlakiewicz [Mon, 27 Nov 2017 05:08:59 +0000 (00:08 -0500)] 
Save proper expected output for test_parse from the previous commit.

7 years agoFix parsing of "-Infinity" when the "-" and "Infinity" are split across multiple...
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.

7 years agoIssue #371: fix parsing of "-Infinity" (although in a somewhat different location...
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.

7 years agoAdd a few extra cases to test_parse to show how trailing bytes are handled, especiall...
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".