MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / json_verify_invalid_number_setting

Function json_verify_invalid_number_setting

deps/lua/src/lua_cjson.c:327–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325
326#if defined(DISABLE_INVALID_NUMBERS) && !defined(USE_INTERNAL_FPCONV)
327void json_verify_invalid_number_setting(lua_State *l, int *setting)
328{
329 if (*setting == 1) {
330 *setting = 0;
331 luaL_error(l, "Infinity, NaN, and/or hexadecimal numbers are not supported.");
332 }
333}
334#else
335#define json_verify_invalid_number_setting(l, s) do { } while(0)
336#endif

Calls 1

luaL_errorFunction · 0.85

Tested by

no test coverage detected