| 449 | /* ===== ENCODING ===== */ |
| 450 | |
| 451 | static 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 |
no test coverage detected