aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/importresult.cpp
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-03-14 09:55:52 +0000
committerWerner Koch <[email protected]>2018-03-14 10:10:12 +0000
commit8eb08b318913644d918002f3195f7ec0e75ae239 (patch)
tree1ed7b71e8616699b7890f2e9b68cf3805a3149be /lang/cpp/src/importresult.cpp
parentdocs: TODO (diff)
downloadgpgme-8eb08b318913644d918002f3195f7ec0e75ae239.tar.gz
gpgme-8eb08b318913644d918002f3195f7ec0e75ae239.zip
core: Import cJSON code from the payproc project.
* src/cJSON.c: New. * src/cJSON.h: New. * src/cJSON.readme: New. -- This is a copy of the code from the payproc commit af5d6b4f820ee19e246a2cab6f56465fe91f1233. The code was originally added to payproc with the commit below. Signed-off-by: Werner Koch <[email protected]> =============================================== commit 7ae7ef29bc5ec19e005e6a5a739233d655f3f05f Author: Werner Koch <[email protected]> AuthorDate: Wed Apr 2 09:01:42 2014 +0200 Commit: Werner Koch <[email protected]> CommitDate: Wed Apr 2 09:12:02 2014 +0200 Simplify cJSON and add new macros. * src/cJSON.h: Re-indented. (cjson_t): New. (cjson_is_): New macros. * src/cJSON.c: Re-indented. Include errno.h and our util.h. (ep): Remove global var. (cJSON_GetErrorPtr): Remove. (cJSON_strcasecmp): Cast args for use with tolower. (cJSON_malloc, cJSON_free): Remove. Change callers to use xtrymalloc and xfree. (cJSON_InitHooks): Remove. (cJSON_strdup): Remove. Change callers to use xtrystrdup. (cJSON_New_Item): Simplify. (cJSON_ParseWithOpts, cJSON_Parse): Add arg R_ERROFF. (parse_string, parse_value, parse_array, parse_object): Add arg EP. -- cJSON has been taken from cjson-code-58.zip. The README file has been renamed to cJSON.readme and the files have been changed to GNU coding standards. Because that parser is small enough to be source copied it does not make sense to treat it as a library and I changed the memory allocation functions to the usual xmalloc ones. The only external dependency now is out util.h which declares those functions. The lowercase cjson_t better fits into our coding style as well as the new macros. Thanks to Dave Gamble for this nice parser. ===============================================
Diffstat (limited to 'lang/cpp/src/importresult.cpp')
0 files changed, 0 insertions, 0 deletions