Eric Haszlakiewicz
0710c835a1
Reformat the json_object-split branch with clang-format
2020-06-16 13:17:58 +00:00
Eric Haszlakiewicz
9128ec49b1
Include unistd.h to fix the build on OSX
2020-06-14 03:11:44 +00:00
Eric Haszlakiewicz
5ebfeaedc5
Drop the _delete field from struct json_object and call the type-specific delete functions directly from json_object_put. (Thanks @dota17 for the suggestion in PR #632!)
2020-06-13 18:34:35 +00:00
Eric Haszlakiewicz
4c10712114
Drop the useless "char data[1]" from struct json_object. Fix a typo in a comment.
2020-06-13 18:25:32 +00:00
Eric Haszlakiewicz
85c244f048
Eliminate unnecessary cast that was added to test_double_serializer.
2020-06-07 18:50:10 +00:00
Eric Haszlakiewicz
02fe2e0ccd
Summarize the changes from the json_object-split branch in the ChangeLog.
2020-06-07 18:45:17 +00:00
Eric Haszlakiewicz
ecdfeb18cf
Move the ssize_t typedef from json_inttypes.h to json_object_private.h so as not to affect publically exposed symbols.
2020-06-07 18:29:56 +00:00
Eric Haszlakiewicz
66d91fdf86
The split of json_object into type-specific sub-structures is now functionally complete.
...
Remove all of the temporary defines, structures, old compat fuctions, extra fields, etc... that were needed during the conversion to a split set of json_object_* structures.
2020-06-07 17:23:56 +00:00
Eric Haszlakiewicz
c4cc673071
More fixes for old MSVC builds.
2020-06-07 15:25:59 +00:00
Eric Haszlakiewicz
0a16b23adf
Fix typo in previous commit to check for SSIZE_T on MSVC.
2020-06-07 15:19:29 +00:00
Eric Haszlakiewicz
eab1375123
Change CMakeLists.txt to look for SSIZE_T on MSVC too.
2020-06-07 03:36:59 +00:00
Eric Haszlakiewicz
b0466b626b
On MSVC, add a ssize_t typedef using SSIZE_T from BaseTsd.h
2020-06-07 03:27:13 +00:00
Eric Haszlakiewicz
0fc9d91277
Kick json_type_string out of struct json_object.
...
The default is now that string data is stored inline at the end of json_object, though to allow for json_object_set_string() to set a _longer_ string, we still need to allow for the possibility of a separate char * pointer.
All json types have been split out now, next step it cleanup.
2020-06-07 02:56:59 +00:00
Eric Haszlakiewicz
9ecb1222bd
Kick json_type_int and json_type_double out of struct json_object.
...
Clean up the code in json_object_new_* a bit by dropping unnecesary json_object_base variables.
2020-05-26 02:31:35 +00:00
Eric Haszlakiewicz
0351bb55c8
Declare variables earlier, to appease Visual Studio 2010.
2020-05-25 04:10:11 +00:00
Eric Haszlakiewicz
d1f83bf5ea
Kick json_type_boolean out of struct json_object.
2020-05-25 04:05:32 +00:00
Eric Haszlakiewicz
5d89fc8a9d
Add some backwards compat for Visual Studio 2013.
2020-05-25 03:52:36 +00:00
Eric Haszlakiewicz
02b687b9a6
Kick json_type_array out of struct json_object; re-enable the test_deep_copy test.
2020-05-25 03:44:56 +00:00
Eric Haszlakiewicz
853b4b5dee
Start splitting struct json_object into multiple sub-types, as descibed at https://github.com/json-c/json-c/wiki/Proposal:-struct-json_object-split
...
The current changes split out _only_ json_type_object, and thus have a number of hacks
to allow the code to continue to build and work.
Originally mentioned in issue #535 .
When complete, this will probably invalidate #552 .
This is likely to cause notable conflicts in any other significant un-merged
changes, such as PR#620.
2020-05-25 03:18:36 +00:00
Eric Haszlakiewicz
4a546e7b2f
In arraylist, use malloc instead of calloc, avoid clearing with memeset until we really need to, and micro-optimize array_list_add().
2020-05-24 03:54:04 +00:00
Eric Hawicz
fbe1543644
Merge pull request #622 from besser82/topic/besser82/doc_subdir
...
doc: Move Doxyfile into doc subdir.
2020-05-18 15:30:21 -04:00
Eric Haszlakiewicz
fa6a7dccb9
With the change in cc80203, Doxyfile no longer needs to be updated for a release.
2020-05-18 17:31:22 +00:00
Eric Hawicz
cc802039a8
Merge pull request #619 from besser82/topic/besser82/doxygen_oot
...
CMake: Fix out-of-tree build for Doxygen documentation.
2020-05-18 13:30:13 -04:00
Eric Hawicz
12b2e1159d
Merge pull request #618 from besser82/topic/besser82/test_deep_copy
...
test_deep_copy: Fix assertion value.
2020-05-18 13:29:21 -04:00
Eric Hawicz
a8a0590921
Merge pull request #617 from besser82/topic/besser82/option_disable_tls
...
Add an option to disable the use of thread-local storage.
2020-05-18 10:25:54 -04:00
Eric Hawicz
5b15c7567d
Merge pull request #614 from stoeckmann/format
...
Prevent truncation on custom double formatters.
2020-05-16 21:04:11 -04:00
Eric Hawicz
311c5e5b2b
Update issue templates
2020-05-16 20:55:20 -04:00
Eric Haszlakiewicz
0a3d22b9bb
Revert part of PR#606 and use isnan/isinf again, but provide macro implementations of those in math_compat.h is needed, as it seems to be on AIX and IBM i systems.
2020-05-16 01:29:18 +00:00
Eric Hawicz
1526c84a13
Merge pull request #606 from davidjmccann/master
...
Improved support for IBM operating systems
2020-05-15 21:15:18 -04:00
Eric Haszlakiewicz
d414d3eabc
Issue #604 : add check for __MINGW32__ in snprintf_compat.h
2020-05-13 14:53:05 +00:00
Eric Haszlakiewicz
2e71fe0963
Display a bit of info about what exactly we're benchmarking.
2020-05-11 03:05:20 +00:00
Eric Haszlakiewicz
199c52e2db
Ignore the bench/work and bench/data directories.
2020-05-11 03:04:10 +00:00
Eric Hawicz
3648c3ed2c
Merge pull request #602 from ploxiln/parse_uint64_errno
...
fix json_parse_uint64() usage of errno
2020-05-10 21:15:47 -04:00
Eric Haszlakiewicz
26f080997d
Fix snprintf on windows problem for test4.
2020-05-10 04:04:28 +00:00
Eric Haszlakiewicz
06742d6277
Issue #600 : don't rename the static library on Windows, it _needs_ to have a different name because the dll build also creates a "json-c.lib" file.
2020-05-10 03:58:51 +00:00
Eric Haszlakiewicz
a59d5acfab
Re-format after recent change to fix linkhash.
2020-05-10 03:58:27 +00:00
Eric Haszlakiewicz
4f43a077a4
Issue #598 : avoid building static libraries twice.
2020-05-10 03:48:45 +00:00
Eric Haszlakiewicz
519dfe1591
Issue #599 : Fix the backwards check in lh_table_insert_w_hash() that was preventing adding more than 11 objects.
...
Add a test to check for this too.
2020-05-10 03:36:05 +00:00
Eric Hawicz
45b6416652
Merge branch 'master' of https://github.com/json-c/json-c
2020-05-08 22:25:15 -04:00
Eric Hawicz
abc9a0731b
Merge pull request #597 from ploxiln/json_parse_usage
...
json_parse demo: fix and use usage() function
2020-05-08 22:23:28 -04:00
Eric Hawicz
22870ac2bd
Merge pull request #595 from dota17/static_shared
...
Support to build both static and shared libraries
2020-05-07 23:23:15 -04:00
Eric Hawicz
31243e4d12
Merge pull request #592 from stoeckmann/oob
...
Prevent out of boundary write on malicious input
2020-05-06 23:31:15 -04:00
Eric Haszlakiewicz
8e3d3d5544
Make the benchmark work with pre-cmake versions of json-c. Fetch a few more data files.
2020-05-04 03:40:40 +00:00
Eric Haszlakiewicz
c66e7377f3
In jc-bench.sh, decode the --before and --after args. Use a separate data dir to avoid re-downloading files when the work dir is cleared.
2020-05-04 03:24:39 +00:00
Eric Haszlakiewicz
8086314026
Issue #589 : drop the rdrand test loops to just 3, tweak comments and add some links to bug reports, and decrease the nesting level of the has_rdrand() function.
2020-05-04 01:33:15 +00:00
Eric Hawicz
a555d0e2f2
Merge pull request #589 from Xyene/detect-broken-rdrand
...
Detect broken RDRAND during initialization
2020-05-03 21:13:48 -04:00
Eric Hawicz
9b64c3e347
Fix printf format issues in apps/json_parse, and actually call the usage() function.
2020-05-03 14:55:12 -04:00
Eric Hawicz
ee90110f9b
Merge pull request #590 from Xyene/fix-cpuid-segfault
...
Fix segmentation fault in CPUID check
2020-05-03 14:52:31 -04:00
Eric Haszlakiewicz
f9605e9072
Fix cmake-configure to accept "--prefix=<foo>" in addition to "--prefix <foo>" (see also Issue #591 )
2020-05-03 03:50:50 +00:00
Eric Haszlakiewicz
1059007024
Add an initial version of a benchmarking harness for json-c, to be able to more easily compare the performance of different library versions.
2020-04-27 04:00:00 +00:00
Eric Haszlakiewicz
d9981f67dd
Extend the CMakeLists.txt in the apps directory to be usable as a standalone build, to link against other versions of json-c.
...
Tweak json_parse.c slightly to allow it to build against older json-c versions.
2020-04-26 04:02:36 +00:00
Eric Haszlakiewicz
00272292a7
The json_parse command line app doesn't build on Windows, disable it.
2020-04-21 21:35:41 +00:00
Eric Haszlakiewicz
55d053118e
Add an apps directory, and a json_parse program to parse an input file and report on memory usage.
...
This is intended to provide a way, during development, to test out the memory
and performance impacts of a change.
2020-04-21 03:57:56 +00:00
Eric Haszlakiewicz
f6f76f9430
Add a JSON_TOKENER_ALLOW_TRAILING_CHARS flag for json_tokener_set_flags() to allow multiple objects to be parsed from input even when JSON_TOKENER_STRICT is set.
2020-04-21 03:53:44 +00:00
Eric Haszlakiewicz
05623b3a2e
Add an tok_flags field to explicitly specify tokener flags in test_parse and eliminate the previous bogus calls to json_tokener_set_flags()
2020-04-21 03:53:44 +00:00
Eric Haszlakiewicz
fa6bc1e2d7
Issue #471 : always create directories with mode 0755, regardless of umask.
2020-04-21 03:19:17 +00:00
Eric Haszlakiewicz
8b511c402b
Issue #585 : don't install config.h
2020-04-21 01:13:21 +00:00
Eric Haszlakiewicz
ba4527904a
Add a few missing git commands to the release checklist, and change the S3 storage to "Standard", since it's actually (barely) cheaper than "Reduced Redundancy" now.
2020-04-19 04:17:29 +00:00
Eric Haszlakiewicz
2babb5b780
Update the master branch to version 0.0.14.99
2020-04-19 03:57:08 +00:00
Eric Haszlakiewicz
31ab57ca8b
Fill in the ChangeLog for the upcoming 0.14 release.
2020-04-19 01:31:48 +00:00
Eric Haszlakiewicz
9ed00a694b
Fill in a few more pre-release steps to match what we've done for the 0.14 release.
...
Move the list of contributors to the AUTHORS file.
2020-04-19 01:28:24 +00:00
Eric Haszlakiewicz
4badbe9c20
Rewrite the issued_closed_for_* files so they display a bit nicer.
2020-04-18 03:22:52 +00:00
Eric Haszlakiewicz
0a95f98b8d
Explicitly mark several things in json_tokener deprecated.
2020-04-18 02:42:46 +00:00
Eric Haszlakiewicz
ecb9354bb1
Re-do clang-format.
2020-04-18 02:14:13 +00:00
Eric Haszlakiewicz
23ddcbd4da
Make json_abort() internal to json_object.c
2020-04-18 02:05:37 +00:00
Eric Haszlakiewicz
5cc11289b4
Make json_tokener_validate_utf8() internal to json_tokener.c, and improve the docs a bit.
2020-04-18 02:02:06 +00:00
Eric Haszlakiewicz
4dc0f1718e
Merge pull request #582 from dota17/list_closed_issue_pr
...
add the list of issues& prs closed
2020-04-17 13:32:17 -04:00
Eric Haszlakiewicz
a9114392b4
Merge pull request #524 from dota17/addTestCase_obj_token
...
Increase coverage
2020-04-15 23:35:21 -04:00
Eric Haszlakiewicz
04bb0fca73
Merge pull request #581 from Jehan/wip/Jehan/no-strict-prototypes-windows
...
CMakeLists: do not enforce strict prototypes on Windows.
2020-04-15 23:32:59 -04:00
Eric Haszlakiewicz
7fb8d56458
Merge pull request #580 from besser82/topic/besser82/fix_cmake_tests
...
Fix CMake tests for enforced strict prototypes.
2020-04-14 15:17:21 -04:00
Eric Haszlakiewicz
ab5425a6a6
Merge pull request #527 from dota17/arraylist_test
...
Arraylist testcase
2020-04-14 10:28:16 -04:00
Eric Haszlakiewicz
511edb51a4
Merge pull request #579 from besser82/topic/besser82/strict-prototypes
...
Enforce strict prototypes.
2020-04-14 10:25:13 -04:00
Eric Haszlakiewicz
4742a2ab1d
Merge pull request #578 from besser82/topic/besser82/pkgconfig_install
...
CMake: Install pkgconfig file in proper location by default
2020-04-12 20:52:01 -04:00
Eric Haszlakiewicz
8269f90956
Merge pull request #577 from besser82/topic/besser82/json_c_version_test_verbose_on_fail
...
Be verbose on failing json_c_version test.
2020-04-11 22:35:40 -04:00
Eric Haszlakiewicz
c58d56ab7c
Merge pull request #576 from besser82/topic/besser82/increase_coverage
...
Test coverage for json_c_version.
2020-04-11 14:45:45 -04:00
Eric Haszlakiewicz
d52f1ff2c1
Merge pull request #575 from besser82/topic/besser82/cosmetics
...
Small cosmetics.
2020-04-11 14:18:37 -04:00
Eric Haszlakiewicz
270dc2f999
Update README.md to remove autoconf instructions in favor of cmake.
2020-04-11 03:24:51 +00:00
Eric Haszlakiewicz
0734c5303d
Merge pull request #572 from besser82/topic/besser82/cmake_fixes
...
Small fixes to CMakeLists
2020-04-10 22:08:27 -04:00
Eric Haszlakiewicz
61392c867f
List the set of contributors since the 0.13 branch
2020-04-10 02:11:48 +00:00
Eric Haszlakiewicz
0a070ef312
Fix one more assert("!invalid cint_type") to use json_abort(...) instead.
2020-04-10 01:26:04 +00:00
Eric Haszlakiewicz
545464322b
Issue #568 : fix the strtoll and strtoull handing so config.h ends up creating defines for those only when needed, which should exclude mingw environments.
2020-04-09 20:58:28 +00:00
Eric Haszlakiewicz
b64bdfe381
Remove autoconf files from .gitignore.
2020-04-09 02:55:21 +00:00
Eric Haszlakiewicz
0c60125211
Update the oss-fuzz build script to try to get it to work with cmake.
2020-04-09 02:35:41 +00:00
Eric Haszlakiewicz
95737df9d4
Remove autoconf machinery, we're using cmake now. Update the release checklist to account for that, plus fill in other tasks and clean it up a bit.
2020-04-09 02:15:31 +00:00
Eric Haszlakiewicz
96ab2f6596
osx builds also need -DDISABLE_BSYMBOLIC=ON
2020-04-08 03:04:27 +00:00
Eric Haszlakiewicz
96bb334650
I have NFC why osx fails when "set -e" is in effect, but leave it off and clean up the rest of the debuging code in the travis config.
2020-04-08 02:54:10 +00:00
Eric Haszlakiewicz
f357081b57
Not all systems (e.g. osx) have malloc.h, include stdlib.h instead.
2020-04-08 02:53:48 +00:00
Eric Haszlakiewicz
2782a6b62c
Try yet again to fix the osx build, this time do set +e
2020-04-08 02:39:03 +00:00
Eric Haszlakiewicz
a86ae1df9a
Another attempt at debugging the travis osx build, this time just ignore errors.
2020-04-08 02:28:02 +00:00
Eric Haszlakiewicz
829e0829dd
Wait a while before exiting travis to allow output to flush.
2020-04-08 02:17:14 +00:00
Eric Haszlakiewicz
cf8421c36d
Apparently cmake is already installed on travis osx builds. Try another approach to figure out what was failing.
2020-04-08 02:02:25 +00:00
Eric Haszlakiewicz
fb0b653612
Install cmake on osx travis builds. s/make check/make test/
2020-04-08 01:45:49 +00:00
Eric Haszlakiewicz
a3b82cbc77
Perform the travis build in a subdir, so the distcheck target works.
2020-04-08 01:34:22 +00:00
Eric Haszlakiewicz
677a8ccf44
Switch travis to use cmake instead of autoconf.
2020-04-08 01:21:11 +00:00
Eric Haszlakiewicz
19bbf2c069
Add includes and split off json_types.h to help ensure that headers can be included in any order.
2020-04-06 13:55:27 +00:00
Eric Haszlakiewicz
5e19c26cae
Don't let clang-format rearrange Windows includes, since they need to be in a particular order.
2020-04-06 02:47:34 +00:00
Eric Haszlakiewicz
9acc4e9d71
Format random_seed.c with clang-format, with key asm sections excluded.
2020-04-06 01:52:28 +00:00
Eric Haszlakiewicz
9a494081cb
Update the style guide to mention that we're using clang-format now.
2020-04-06 01:49:14 +00:00
Eric Haszlakiewicz
31f1ab2be1
Merge pull request #555 from dota17/chang_format_3
...
Format json-c with clang-format tool
2020-04-03 00:13:34 -04:00
Eric Haszlakiewicz
ed54353d84
Merge pull request #563 from robybeen/master
...
Changed order of calloc args to match stdlib
2020-04-02 22:35:21 -04:00