MCPcopy Create free account
hub / github.com/git/git / assert_in_array

Function assert_in_array

json-writer.c:82–88  ·  view source on GitHub ↗

* Assert that the top of the open-stack is an array. */

Source from the content-addressed store, hash-verified

80 * Assert that the top of the open-stack is an array.
81 */
82static void assert_in_array(const struct json_writer *jw)
83{
84 if (!jw->open_stack.len)
85 BUG("json-writer: array: missing jw_array_begin()");
86 if (jw->open_stack.buf[jw->open_stack.len - 1] != '[')
87 BUG("json-writer: array: not in array");
88}
89
90/*
91 * Add comma if we have already seen a member at this level.

Callers 1

array_commonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected