MCPcopy Create free account
hub / github.com/Bwar/CJsonObject / print_double

Function print_double

cJSON.c:186–196  ·  view source on GitHub ↗

Render the number nicely from the given item into a string. */

Source from the content-addressed store, hash-verified

184
185/* Render the number nicely from the given item into a string. */
186static char *print_double(cJSON *item)
187{
188 char *str;
189 double d = item->valuedouble;
190 str = (char*) cJSON_malloc(64); /* This is a nice tradeoff. */
191 if (str)
192 {
193 sprintf(str, "%.16f", d);
194 }
195 return str;
196}
197
198static char *print_int(cJSON *item)
199{

Callers 1

print_valueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected