aboutsummaryrefslogtreecommitdiffstats
path: root/src/wait-user.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-03-14 10:24:38 +0000
committerWerner Koch <[email protected]>2018-03-16 12:36:04 +0000
commit81c90d0cd0f959fd5e01baed9b4af0ec35ecb85c (patch)
treef35c1b4809b70c20e495e2f4482399d0f07670de /src/wait-user.c
parentcore: Import cJSON code from the payproc project. (diff)
downloadgpgme-81c90d0cd0f959fd5e01baed9b4af0ec35ecb85c.tar.gz
gpgme-81c90d0cd0f959fd5e01baed9b4af0ec35ecb85c.zip
core: Adjust cJSON code for use in GPGME.
* src/cJSON.c: Remove util.h. Use gpgrt alloc functions. (cJSON_Delete): Do not clobber ERRNO. (cJSON_AddItemToObject): Return OBJECT or NULL. (cJSON_AddNullToObject): New. (cJSON_AddTrueToObject): New. (cJSON_AddFalseToObject): New. (cJSON_AddBoolToObject): New. (cJSON_AddNumberToObject): New. (cJSON_AddStringToObject): New. * src/cJSON.h (cJSON__h): Replace macro by cJSON_h for C compliance. (cJSON_AddNullToObject): Remove macro. (cJSON_AddTrueToObject): Remove macro. (cJSON_AddFalseToObject): Remove macro. (cJSON_AddBoolToObject): Remove macro. (cJSON_AddNumberToObject): Remove macro. (cJSON_AddStringToObject): Remove macro. -- The gpgrt malloc functions are used so that we can easily mix memory returned by gpgrt (e.g. es_read_line) with memory returned from the JSON function. In general that is not needed but on Windows it makes a difference if the gpgme DLL is linked to a different C runtime than the application. The macros have been replaced to allow error checking (i.e out of core) for these functions. More error checking should be implemented instead of silently creating objects which are not as requested. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/wait-user.c')
0 files changed, 0 insertions, 0 deletions