Lines Matching refs:string

195 static unsigned char* cJSON_strdup(const unsigned char* string, const internal_hooks * const hooks)  in cJSON_strdup()  argument
200 if (string == NULL) in cJSON_strdup()
205 length = strlen((const char*)string) + sizeof(""); in cJSON_strdup()
211 memcpy(copy, string, length); in cJSON_strdup()
274 if (!(item->type & cJSON_StringIsConst) && (item->string != NULL)) in cJSON_Delete()
276 global_hooks.deallocate(item->string); in cJSON_Delete()
1668 current_item->string = current_item->valuestring; in parse_object()
1756 if (!print_string_ptr((unsigned char*)current_item->string, output_buffer)) in print_object()
1889 …((current_element != NULL) && (current_element->string != NULL) && (strcmp(name, current_element-> in get_object_item()
1896 …ensitive_strcmp((const unsigned char*)name, (const unsigned char*)(current_element->string)) != 0)) in get_object_item()
1902 if ((current_element == NULL) || (current_element->string == NULL)) { in get_object_item()
1909 CJSON_PUBLIC(cJSON *) cJSON_GetObjectItem(const cJSON * const object, const char * const string) in cJSON_GetObjectItem() argument
1911 return get_object_item(object, string, false); in cJSON_GetObjectItem()
1914 …IC(cJSON *) cJSON_GetObjectItemCaseSensitive(const cJSON * const object, const char * const string) in cJSON_GetObjectItemCaseSensitive() argument
1916 return get_object_item(object, string, true); in cJSON_GetObjectItemCaseSensitive()
1919 CJSON_PUBLIC(cJSON_bool) cJSON_HasObjectItem(const cJSON *object, const char *string) in cJSON_HasObjectItem() argument
1921 return cJSON_GetObjectItem(object, string) ? 1 : 0; in cJSON_HasObjectItem()
1947 reference->string = NULL; in create_reference()
2008 static void* cast_away_const(const void* string) in cast_away_const() argument
2010 return (void*)string; in cast_away_const()
2017 static cJSON_bool add_item_to_object(cJSON * const object, const char * const string, cJSON * const… in add_item_to_object() argument
2022 if ((object == NULL) || (string == NULL) || (item == NULL) || (object == item)) in add_item_to_object()
2029 new_key = (char*)cast_away_const(string); in add_item_to_object()
2034 new_key = (char*)cJSON_strdup((const unsigned char*)string, hooks); in add_item_to_object()
2043 if (!(item->type & cJSON_StringIsConst) && (item->string != NULL)) in add_item_to_object()
2045 hooks->deallocate(item->string); in add_item_to_object()
2048 item->string = new_key; in add_item_to_object()
2054 CJSON_PUBLIC(cJSON_bool) cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item) in cJSON_AddItemToObject() argument
2056 return add_item_to_object(object, string, item, &global_hooks, false); in cJSON_AddItemToObject()
2060 CJSON_PUBLIC(cJSON_bool) cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item) in cJSON_AddItemToObjectCS() argument
2062 return add_item_to_object(object, string, item, &global_hooks, true); in cJSON_AddItemToObjectCS()
2075 CJSON_PUBLIC(cJSON_bool) cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *i… in cJSON_AddItemReferenceToObject() argument
2077 if ((object == NULL) || (string == NULL)) in cJSON_AddItemReferenceToObject()
2082 …return add_item_to_object(object, string, create_reference(item, &global_hooks), &global_hooks, fa… in cJSON_AddItemReferenceToObject()
2145 …) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) in cJSON_AddStringToObject() argument
2147 cJSON *string_item = cJSON_CreateString(string); in cJSON_AddStringToObject()
2238 CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObject(cJSON *object, const char *string) in cJSON_DetachItemFromObject() argument
2240 cJSON *to_detach = cJSON_GetObjectItem(object, string); in cJSON_DetachItemFromObject()
2245 CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObjectCaseSensitive(cJSON *object, const char *string) in cJSON_DetachItemFromObjectCaseSensitive() argument
2247 cJSON *to_detach = cJSON_GetObjectItemCaseSensitive(object, string); in cJSON_DetachItemFromObjectCaseSensitive()
2252 CJSON_PUBLIC(void) cJSON_DeleteItemFromObject(cJSON *object, const char *string) in cJSON_DeleteItemFromObject() argument
2254 cJSON_Delete(cJSON_DetachItemFromObject(object, string)); in cJSON_DeleteItemFromObject()
2257 CJSON_PUBLIC(void) cJSON_DeleteItemFromObjectCaseSensitive(cJSON *object, const char *string) in cJSON_DeleteItemFromObjectCaseSensitive() argument
2259 cJSON_Delete(cJSON_DetachItemFromObjectCaseSensitive(object, string)); in cJSON_DeleteItemFromObjectCaseSensitive()
2343 static cJSON_bool replace_item_in_object(cJSON *object, const char *string, cJSON *replacement, cJS… in replace_item_in_object() argument
2345 if ((replacement == NULL) || (string == NULL)) in replace_item_in_object()
2351 if (!(replacement->type & cJSON_StringIsConst) && (replacement->string != NULL)) in replace_item_in_object()
2353 cJSON_free(replacement->string); in replace_item_in_object()
2355 replacement->string = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); in replace_item_in_object()
2358 …return cJSON_ReplaceItemViaPointer(object, get_object_item(object, string, case_sensitive), replac… in replace_item_in_object()
2361 CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemInObject(cJSON *object, const char *string, cJSON *newite… in cJSON_ReplaceItemInObject() argument
2363 return replace_item_in_object(object, string, newitem, false); in cJSON_ReplaceItemInObject()
2366 CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object, const char *string, … in cJSON_ReplaceItemInObjectCaseSensitive() argument
2368 return replace_item_in_object(object, string, newitem, true); in cJSON_ReplaceItemInObjectCaseSensitive()
2442 CJSON_PUBLIC(cJSON *) cJSON_CreateString(const char *string) in cJSON_CreateString() argument
2448 item->valuestring = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); in cJSON_CreateString()
2459 CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string) in cJSON_CreateStringReference() argument
2465 item->valuestring = (char*)cast_away_const(string); in cJSON_CreateStringReference()
2706 if (item->string) in cJSON_Duplicate()
2708 …newitem->string = (item->type&cJSON_StringIsConst) ? item->string : (char*)cJSON_strdup((unsigned … in cJSON_Duplicate()
2709 if (!newitem->string) in cJSON_Duplicate()
3041 b_element = get_object_item(b, a_element->string, case_sensitive); in cJSON_Compare()
3057 a_element = get_object_item(a, b_element->string, case_sensitive); in cJSON_Compare()