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