MCPcopy Create free account
hub / github.com/OpenIPC/firmware / cJSON_GetNumberValue

Function cJSON_GetNumberValue

general/package/xmdp/src/cjson/cJSON.c:105–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105CJSON_PUBLIC(double) cJSON_GetNumberValue(cJSON *item)
106{
107 if (!cJSON_IsNumber(item))
108 {
109 return NAN;
110 }
111
112 return item->valuedouble;
113}
114
115/* This is a safeguard to prevent copy-pasters from using incompatible C and header files */
116#if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 7) || (CJSON_VERSION_PATCH != 13)

Callers 1

cJSON.hFile · 0.85

Calls 1

cJSON_IsNumberFunction · 0.85

Tested by

no test coverage detected