Steve Gerbino
702b42eaf3
Modified CMakeLists.txt to use autotools to generate configuration for Unix systems
2016-09-25 22:03:56 -04:00
Steve Gerbino
43afcc0d99
Lowered CMake required version so that Travis CI is able to build, moved include folder to include/json-c to match the behavior of autotools
2016-09-25 18:49:34 -04:00
Steve Gerbino
fe941a26a3
Trailing slash seems necessary in the install command to get contents
2016-09-25 15:04:05 -04:00
Steve Gerbino
ab7c09dc8e
Forget DESTINATION in CMake install command
2016-09-25 14:59:38 -04:00
Steve Gerbino
34b4a490b1
We need to also install the generated configuration files
2016-09-25 14:57:15 -04:00
Steve Gerbino
989e39d995
Fixed typo in CMakeList.txt FILES_MATCHING
2016-09-25 14:46:33 -04:00
Steve Gerbino
e2ee223dc2
Added install instructions for CMake
2016-09-25 14:42:14 -04:00
Steve Gerbino
69f018c49e
Resolves json-c/json-c#271 by adding MacOS configuration files and modifies CMakeLists.txt to use them
2016-09-25 02:14:57 -04:00
Eric Haszlakiewicz
9f9c3326fe
Merge pull request #267 from sixlettervariables/patch-1
...
Removes me as Win32 maintainer, because I'm not.
2016-09-12 18:19:26 -04:00
Christopher Watford
21e5ffbcf8
Removes me as a maintainer, because I'm not.
...
Updates README-WIN32.html to remove my status as a maintainer (I'm not). Also removes ancient porting notes and adds a reference to json_config.h.win32 which is where most folks should go to start with Windows issues.
2016-09-12 14:18:21 -04:00
Eric Haszlakiewicz
ea1499a372
Issue #263 : add const so the prototype for json_object_object_add_ex() matches the definition.
2016-08-24 23:41:22 -04:00
Randy Armstrong
c5b5a984cd
Add Cmakefile
2016-08-24 22:49:16 -04:00
Eric Haszlakiewicz
0fcf1d1ae7
Fix memory leak and inconsistent output (due to varying fd numbers) in test_util_file.
2016-08-20 23:06:22 -04:00
Eric Haszlakiewicz
5fccfed4f4
Issue #260 : add a check to prevent trivial loops in the object tree, even though it is up to the callers to avoid doing so in more complex cases.
2016-08-20 22:42:59 -04:00
Eric Haszlakiewicz
c4d060bf80
json_object_object_add_ex() should have shared code with json_object_object_add(), and been changed to return int at the same time the latter was. Do that now.
...
Also correct a couple of calls to _to_json_string to check the return value.
2016-08-20 22:42:59 -04:00
Eric Haszlakiewicz
e40505e489
Merge branch 'RyDroid-tests'
2016-08-13 09:17:25 -04:00
Eric Haszlakiewicz
61cd433131
Merge branch 'tests' of https://github.com/RyDroid/json-c into RyDroid-tests
...
Conflicts:
tests/test_util_file.c
2016-08-13 09:17:01 -04:00
Eric Haszlakiewicz
e076ae756d
Merge pull request #251 from RyDroid/editorconfig
...
Adding a file for EditorConfig
2016-08-13 08:31:57 -04:00
Nicola Spanti (RyDroid)
8215c0ac0e
Very minor changes to some tests
2016-08-13 00:53:33 +02:00
Nicola Spanti (RyDroid)
b222d4386e
Adding a file for EditorConfig
2016-08-13 00:27:58 +02:00
Eric Haszlakiewicz
4d62de3898
Revert bogus change to json_object_get() made in f40b08d8 that caused it to always return NULL. (Issue #259 )
...
Also undo NULL check in json_tokener_set_flags(): it's not at all valid toi
try to set flags on a NULL pointer, and doing so should not be silently
ignored.
2016-08-11 17:05:41 -04:00
Eric Haszlakiewicz
0ad87649d4
Merge pull request #255 from RyDroid/minor-c2
...
Minor changes in C source code
2016-08-10 15:06:30 -04:00
Eric Haszlakiewicz
9f9a9ac426
Merge pull request #252 from RyDroid/minor-no-c
...
Very minor changes not related to C source code
2016-08-09 07:39:27 -04:00
Eric Haszlakiewicz
71d0615e98
Merge branch 'jobol-issue-165'
2016-08-09 07:38:18 -04:00
Eric Haszlakiewicz
f3db59d990
Merge branch 'issue-165' of https://github.com/jobol/json-c into jobol-issue-165
...
Conflicts:
tests/test_util_file.c
2016-08-09 07:36:54 -04:00
Eric Haszlakiewicz
bc3e691a1e
Merge pull request #253 from RyDroid/cppcheck-travis
...
Adding a test with cppcheck for Travis CI
2016-08-08 22:57:56 -04:00
Eric Haszlakiewicz
51b011ce24
Merge pull request #249 from RyDroid/readme
...
Improving README
2016-08-08 22:53:33 -04:00
Eric Haszlakiewicz
d758f4a8a7
Add a brief style guide. Address Issue #257 .
2016-08-08 22:50:23 -04:00
Eric Haszlakiewicz
33ae9f5d44
Merge pull request #250 from RyDroid/gitignore
...
Improving .gitignore
2016-08-08 18:42:01 +00:00
Nicola Spanti (RyDroid)
ab1d761865
Improving .gitignore
2016-08-08 15:29:47 +02:00
Nicola Spanti (RyDroid)
f2e7dda910
Improving README
2016-08-08 15:25:31 +02:00
Nicola Spanti (RyDroid)
36b4003118
Adding a test with cppcheck for Travis CI
2016-08-08 15:23:27 +02:00
Nicola Spanti (RyDroid)
f40b08d8f0
Minor changes in C source code
2016-08-08 15:20:41 +02:00
Nicola Spanti (RyDroid)
250a3987cf
Very minor changes not related to C source code
2016-08-08 15:13:43 +02:00
Eric Haszlakiewicz
9688f343a5
Issue #246 : Include xlocale.h too, to get locale_t defined, since not all OSes include that in locale.h
2016-08-02 22:25:05 -04:00
José Bollo
1fceb2207a
test: add test of 'json_object_to_json_string_length'
...
The test is implied in test1.
The idea is to check that the returned lengths and strings
are identical to what is expected to return the already
tested function 'json_object_to_json_string_ext'.
Signed-off-by: José Bollo <jose.bollo@iot.bzh >
2016-08-01 15:04:54 +02:00
Eric Haszlakiewicz
fa76e4a8c9
Issue #195 : Actually call uselocale() in the new locale handling code in json_tokener.
...
Also, be sure the right locale_t is freed if we fail on the second uselocale.
Finally, fix test_locale so it *doesn't* use json_object_to_json_string as
that will simple re-emit the original parsed string values.
2016-07-31 14:43:14 -04:00
Eric Haszlakiewicz
4091b9c87e
Issue #195 : use uselocale() instead of setlocale() in json_tokener to behave better in threaded environments.
2016-07-30 21:34:58 -04:00
Eric Haszlakiewicz
7d637362b7
Linux's %p format doesn't return "0x0" for NULL pointers, so switch to using %lx for consistency.
2016-07-30 15:09:51 -04:00
Eric Haszlakiewicz
deb9fa482d
Issue #240 : add arbitrary use of val's in foreach loops to squash warnings about unused variables.
2016-07-30 18:27:53 +00:00
jobol
344009bf26
Add method 'json_object_to_json_string_length'
...
This new method allows to also
get the length of the generated string.
Fix #165
Change-Id: Iea91404027f143ca3d29a4c58d7c07ae53556110
Signed-off-by: José Bollo <jose.bollo@iot.bzh >
2016-07-27 14:45:25 +02:00
José Bollo
54ae254537
Fix a compiling error
...
The function fstat isn't declared without this include
on debian strect/sid and Fedora-23
Change-Id: I660a32ff173dcba04674aed51ed855b4fa55ac67
Signed-off-by: José Bollo <jose.bollo@iot.bzh >
2016-07-27 14:42:25 +02:00
Eric Haszlakiewicz
b366750e11
Merge pull request #239 from ploxiln/printbuf_empty
...
initialize null terminator of new printbuf
2016-07-16 13:49:08 -04:00
Pierce Lopez
868b20ce4e
initialize null terminator of new printbuf
...
It's possible (e.g. by using json_object_from_file() on an empty file)
to get json-c to try to use a printbuf that has never had anything
written to it. Before this change, it could access a string that
should be length zero, but was never initialized, and could
theoretically have an unexpected string.
2016-07-16 00:30:31 -04:00
Eric Haszlakiewicz
2b255d0ebf
Fix absolute paths in test_util_file that vary depending on where it is run.
2016-06-27 04:30:10 +00:00
Eric Haszlakiewicz
b1d65b62db
Issue #113 : Add more files to EXTRA_DIST and a dist-hook to get distcheck to at least not fail.
2016-06-27 04:30:04 +00:00
Eric Haszlakiewicz
1071385896
Issue #113 : add "new" files to appropriate variables in Makefile, and note the need to run "make distcheck" as part of the release process.
...
Fix issues with the test script so it works under distcheck too.
2016-06-27 04:15:30 +00:00
Eric Haszlakiewicz
29005ef7b1
Merge pull request #238 from nagamalli9999/master
...
linkhash.c: optimised the table_free path
2016-06-26 23:09:42 -04:00
Eric Haszlakiewicz
29ef73f21d
Issue #189 : Eliminate use of MC_ERROR from json_util.c, and add a json_util_get_last_err() function to retrieve the error for those callers that care about it.
...
Add tests and descriptions for the functions in json_util.c
2016-06-26 02:20:33 +00:00
Eswar Yaganti
78cf6e63ff
linkhash.h: removed redundant params from comments
2016-06-25 23:05:41 +05:30