MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / json_encode_exception

Function json_encode_exception

LuaSTGPlus/LuaExtensions/cjson4lua/lua_cjson.c:451–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449/* ===== ENCODING ===== */
450
451static void json_encode_exception(lua_State *l, json_config_t *cfg, strbuf_t *json, int lindex,
452 const char *reason)
453{
454 if (!cfg->encode_keep_buffer)
455 strbuf_free(json);
456 luaL_error(l, "Cannot serialise %s: %s",
457 lua_typename(l, lua_type(l, lindex)), reason);
458}
459
460/* json_append_string args:
461 * - lua_State

Callers 4

lua_array_lengthFunction · 0.85
json_append_numberFunction · 0.85
json_append_objectFunction · 0.85
json_append_dataFunction · 0.85

Calls 1

strbuf_freeFunction · 0.85

Tested by

no test coverage detected