MCPcopy Create free account
hub / github.com/ByConity/ByConity / update_offset

Function update_offset

contrib/cJSON/cJSON.cpp:472–482  ·  view source on GitHub ↗

calculate the new length of the string in a printbuffer and update the offset */

Source from the content-addressed store, hash-verified

470
471/* calculate the new length of the string in a printbuffer and update the offset */
472static void update_offset(printbuffer * const buffer)
473{
474 const unsigned char *buffer_pointer = NULL;
475 if ((buffer == NULL) || (buffer->buffer == NULL))
476 {
477 return;
478 }
479 buffer_pointer = buffer->buffer + buffer->offset;
480
481 buffer->offset += strlen((const char*)buffer_pointer);
482}
483
484/* Render the number nicely from the given item into a string. */
485static cJSON_bool print_number(const cJSON * const item, printbuffer * const output_buffer)

Callers 3

printFunction · 0.85
print_arrayFunction · 0.85
print_objectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected