diff options
| author | 2024-04-14 19:26:49 +0200 | |
|---|---|---|
| committer | 2024-04-14 19:26:49 +0200 | |
| commit | 0275658a3602f74035ff776dac8d8f64b9a2794f (patch) | |
| tree | d9489684e46d7cd0d5bd8347a880316abe22f48f /xs_json.h | |
| parent | Better redirection URL building in oauth_post_handler(). (diff) | |
| download | penes-snac2-0275658a3602f74035ff776dac8d8f64b9a2794f.tar.gz penes-snac2-0275658a3602f74035ff776dac8d8f64b9a2794f.tar.xz penes-snac2-0275658a3602f74035ff776dac8d8f64b9a2794f.zip | |
Backport from xs.
Diffstat (limited to 'xs_json.h')
| -rw-r--r-- | xs_json.h | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -328,7 +328,7 @@ static xs_val *_xs_json_load_lexer(FILE *f, js_type *t) | |||
| 328 | 328 | ||
| 329 | int xs_json_load_array_iter(FILE *f, xs_val **value, xstype *pt, int *c) | 329 | int xs_json_load_array_iter(FILE *f, xs_val **value, xstype *pt, int *c) |
| 330 | /* loads the next scalar value from the JSON stream */ | 330 | /* loads the next scalar value from the JSON stream */ |
| 331 | /* if the value ahead is complex, value is NULL and pt is filled */ | 331 | /* if the value ahead is compound, value is NULL and pt is set */ |
| 332 | { | 332 | { |
| 333 | js_type t; | 333 | js_type t; |
| 334 | 334 | ||
| @@ -348,7 +348,7 @@ int xs_json_load_array_iter(FILE *f, xs_val **value, xstype *pt, int *c) | |||
| 348 | } | 348 | } |
| 349 | 349 | ||
| 350 | if (*value == NULL) { | 350 | if (*value == NULL) { |
| 351 | /* possible complex type ahead */ | 351 | /* possible compound type ahead */ |
| 352 | if (t == JS_OBRACK) | 352 | if (t == JS_OBRACK) |
| 353 | *pt = XSTYPE_LIST; | 353 | *pt = XSTYPE_LIST; |
| 354 | else | 354 | else |
| @@ -365,7 +365,7 @@ int xs_json_load_array_iter(FILE *f, xs_val **value, xstype *pt, int *c) | |||
| 365 | 365 | ||
| 366 | 366 | ||
| 367 | xs_list *xs_json_load_array(FILE *f) | 367 | xs_list *xs_json_load_array(FILE *f) |
| 368 | /* loads a JSON array (after the initial OBRACK) */ | 368 | /* loads a full JSON array (after the initial OBRACK) */ |
| 369 | { | 369 | { |
| 370 | xstype t; | 370 | xstype t; |
| 371 | xs_list *l = xs_list_new(); | 371 | xs_list *l = xs_list_new(); |
| @@ -406,7 +406,7 @@ xs_list *xs_json_load_array(FILE *f) | |||
| 406 | 406 | ||
| 407 | int xs_json_load_object_iter(FILE *f, xs_str **key, xs_val **value, xstype *pt, int *c) | 407 | int xs_json_load_object_iter(FILE *f, xs_str **key, xs_val **value, xstype *pt, int *c) |
| 408 | /* loads the next key and scalar value from the JSON stream */ | 408 | /* loads the next key and scalar value from the JSON stream */ |
| 409 | /* if the value ahead is complex, value is NULL and pt is filled */ | 409 | /* if the value ahead is compound, value is NULL and pt is set */ |
| 410 | { | 410 | { |
| 411 | js_type t; | 411 | js_type t; |
| 412 | 412 | ||
| @@ -453,7 +453,7 @@ int xs_json_load_object_iter(FILE *f, xs_str **key, xs_val **value, xstype *pt, | |||
| 453 | 453 | ||
| 454 | 454 | ||
| 455 | xs_dict *xs_json_load_object(FILE *f) | 455 | xs_dict *xs_json_load_object(FILE *f) |
| 456 | /* loads a JSON object (after the initial OCURLY) */ | 456 | /* loads a full JSON object (after the initial OCURLY) */ |
| 457 | { | 457 | { |
| 458 | xstype t; | 458 | xstype t; |
| 459 | xs_dict *d = xs_dict_new(); | 459 | xs_dict *d = xs_dict_new(); |