luaO_str2d
#define buff2d(b,e) luaO_str2d(luaZ_buffer(b), luaZ_bufflen(b) - 1, e)
LUAI_FUNC int luaO_str2d (const char *s, size_t len, lua_Number *result);
if (ttisstring(obj) && luaO_str2d(svalue(obj), tsvalue(obj)->len, &num)) {