mirror of
https://github.com/DaveGamble/cJSON
synced 2024-12-23 15:12:04 +00:00
add new macro for iterating over an array
This commit is contained in:
parent
affedd65ba
commit
0da343068e
3
cJSON.h
3
cJSON.h
@ -142,6 +142,9 @@ extern void cJSON_Minify(char *json);
|
||||
#define cJSON_SetIntValue(object,val) ((object)?(object)->valueint=(object)->valuedouble=(val):(val))
|
||||
#define cJSON_SetNumberValue(object,val) ((object)?(object)->valueint=(object)->valuedouble=(val):(val))
|
||||
|
||||
/* Macro for iterating over an array */
|
||||
#define cJSON_ArrayForEach(pos, head) for(pos = (head)->child; pos != NULL; pos = pos->next)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user