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

Function assert_in_object

json-writer.c:71–77  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

69 * Assert that the top of the open-stack is an object.
70 */
71static void assert_in_object(const struct json_writer *jw, const char *key)
72{
73 if (!jw->open_stack.len)
74 BUG("json-writer: object: missing jw_object_begin(): '%s'", key);
75 if (jw->open_stack.buf[jw->open_stack.len - 1] != '{')
76 BUG("json-writer: object: not in object: '%s'", key);
77}
78
79/*
80 * Assert that the top of the open-stack is an array.

Callers 1

object_commonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected