Petri Lehtinen
a8f5fa5f5a
Tweak clang-format configuration a bit
...
Set ColumnLimit to 90, remove AllowShortCaseLabelsOnASingleLine.
2019-10-21 08:56:03 +03:00
Petri Lehtinen
79fe8c3435
Run clang-format on *.c, *.h
2019-10-21 08:55:01 +03:00
Petri Lehtinen
074bb3838f
Update copyrights for 2016
2016-09-18 14:17:03 +03:00
Petri Lehtinen
890760b2fb
Increase test coverage
2014-12-19 08:35:46 +02:00
Petri Lehtinen
30fdf6067e
Update copyrights for 2014
2014-01-28 09:16:05 +02:00
Petri Lehtinen
3196ad48ed
pack: Add format specifiers s#, + and +#
2013-08-14 21:54:11 +03:00
Petri Lehtinen
2489ea90b1
Update copyrights for 2013
2013-07-23 13:20:06 +03:00
Petri Lehtinen
6281d1c549
Merge pull request #108 from Zillode/1edff47af38a2335f88300ee6dc437118f5a20ff
...
Fixes redefined warnings ("_GNU_SOURCE")
2013-04-02 05:40:49 -07:00
Lode Hoste
1edff47af3
Do not define _GNU_SOURCE is already defined
2013-03-14 21:34:11 +01:00
Petri Lehtinen
3c6e36ba2d
Update copyright notices for 2012
2012-03-20 20:55:55 +02:00
JKL
cd9757512d
use size_t for strbuffer writes, and avoid integer overflow
2011-06-30 20:45:18 +03:00
Petri Lehtinen
eab23f05d8
Fix a few malloc() and free() calls
...
Replace them with jsonp_malloc() and jsonp_free() to support the
custom memory allocation.
2011-03-31 16:37:43 +03:00
Petri Lehtinen
4be9e9e7fe
Add custom memory allocation
...
Thanks to Basile Starynkevitch for the suggestion and initial patch.
Thanks to Jonathan Landis and Deron Meranda for showing how this can
be utilized for implementing secure memory operations.
2011-02-17 10:10:53 +02:00
Petri Lehtinen
fa7c2ea070
Update copyright notices for 2011
2011-01-22 13:43:14 +02:00
Petri Lehtinen
06eb436008
Move max() to jansson_private.h, define only if not already defined
...
On some platforms (Visual C++ for one) the standard library already
defines max() as a macro.
2010-09-05 21:18:46 +03:00
Petri Lehtinen
08dc8d9baf
Add year 2010 to copyright notices
2010-02-02 21:26:11 +02:00
Petri Lehtinen
2f4d6f8ae7
Add LICENSE and a copyright note to all sources
2009-07-30 11:32:24 +03:00
Petri Lehtinen
625f50f916
Streamify the loader
...
It's no longer needed to load the whole input into a string and then
parse from the string. Instead, the input is read as needed from
a string or file.
2009-07-13 21:45:16 +03:00
Petri Lehtinen
55af26f05a
strbuffer: Optimize string termination
...
Do not zero all of the memory, just the first unused byte to make the
string null terminated.
2009-07-04 13:19:41 +03:00
Petri Lehtinen
b1fe723a7f
Fix json_loadf and json_loadfd with empty input
...
Nothing was appended to strbuffer, so the buffer was left empty. An
empty strbuffer is not an empty string but NULL, so the result was a
segfault.
This patch fixes the problem by initializing strbuffer to an empty
string.
2009-06-30 13:55:20 +03:00
Petri Lehtinen
8c697312e4
strbuffer_value: Return a read-only pointer rather than duplicating the value
2009-06-13 22:27:23 +03:00
Petri Lehtinen
3e0134782b
strbuffer: Allocate enough space for value initially
2009-06-13 22:26:23 +03:00
Petri Lehtinen
197d3aa160
Implement strbuffer
...
String buffer (strbuffer) is an object that resizes automatically when
data is added to it. It was implemented by generalizing the technique
used in json_dumps().
2009-06-11 08:56:11 +03:00