Commit Graph

8 Commits

Author SHA1 Message Date
Alexandru Ardelean
fb72160caf build: make strerror() override-able
If we want to override `strerror()` in libjson-c
to make tests consistent across platforms, we
need to do it build-wide as configure/build
option.

Apple linkers make it really hard to override functions
at link-time, and this seems to be locked down on travis-ci.org
[ for security reasons I assume ].
While I got it to work locally, it did not work
when running on travis.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2017-07-13 10:27:24 +03:00
Eric Haszlakiewicz
91977159ee Add cast to int in calls to isdigit() since some platforms complain about char being used as an array index. 2017-02-05 04:34:05 +00:00
Eric Haszlakiewicz
0a010a59eb Change a memcpy that should be a memmove within json_pointer_get, and fix memory leaks in of one the json_pointer tests. 2016-12-18 14:33:41 -05:00
Alexandru Ardelean
47f32a76ef vasprintf_compat.h: spin-off this compat header ; use math_compat.h as template
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-11-22 16:37:30 +02:00
Alexandru Ardelean
8cb86a583a strdup_compat.h: re-spin this compat header ; use math_compat.h as template
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-11-22 16:37:29 +02:00
Alexandru Ardelean
742e059da1 json_pointer: add json_pointer_getf/setf() function variants
These include support for printf() style args for path.

Adds support for calling with 'json_pointer_getf(obj, &res, "/foo/%d/%s", 0, bar)'
style args.

Makes it easier for doing more dynamic stuff/magic, without
needing to use vasprintf() externally.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-11-22 16:33:49 +02:00
Alexandru Ardelean
97dd7d5103 json_pointer.c: fix whitespace
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-11-16 16:15:53 +02:00
Alexandru Ardelean
0e91183300 json_pointer: add first revision
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2016-11-04 09:51:36 +02:00