cJSON.h: Document cJSON_ArrayForEach for objects

This commit is contained in:
Max Bruckner 2017-05-10 13:17:38 +02:00
parent de5df3e56f
commit ddf268b074

View File

@ -249,7 +249,7 @@ CJSON_PUBLIC(void) cJSON_Minify(char *json);
CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number); CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number);
#define cJSON_SetNumberValue(object, number) ((object != NULL) ? cJSON_SetNumberHelper(object, (double)number) : (number)) #define cJSON_SetNumberValue(object, number) ((object != NULL) ? cJSON_SetNumberHelper(object, (double)number) : (number))
/* Macro for iterating over an array */ /* Macro for iterating over an array or object */
#define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next) #define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)
/* malloc/free objects using the malloc/free functions that have been set with cJSON_InitHooks */ /* malloc/free objects using the malloc/free functions that have been set with cJSON_InitHooks */