MCPcopy Create free account
hub / github.com/Tencent/Hardcoder / update_offset

Function update_offset

libapp2sys/src/main/cpp/cjson/cJSON.c:462–472  ·  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

460
461/* calculate the new length of the string in a printbuffer and update the offset */
462static void update_offset(printbuffer * const buffer)
463{
464 const unsigned char *buffer_pointer = NULL;
465 if ((buffer == NULL) || (buffer->buffer == NULL))
466 {
467 return;
468 }
469 buffer_pointer = buffer->buffer + buffer->offset;
470
471 buffer->offset += strlen((const char*)buffer_pointer);
472}
473
474/* Render the number nicely from the given item into a string. */
475static 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