WILL_LJMP(luaL_error(L, "full stack"));
lua_pushstring(L, name);
lua_pushinteger(L, value);
- lua_settable(L, -3);
+ lua_rawset(L, -3);
}
__LJMP static inline void hlua_class_const_str(lua_State *L, const char *name,
const char *value)
WILL_LJMP(luaL_error(L, "full stack"));
lua_pushstring(L, name);
lua_pushstring(L, value);
- lua_settable(L, -3);
+ lua_rawset(L, -3);
}
__LJMP static inline void hlua_class_function(lua_State *L, const char *name,
int (*function)(lua_State *L))
WILL_LJMP(luaL_error(L, "full stack"));
lua_pushstring(L, name);
lua_pushcclosure(L, function, 0);
- lua_settable(L, -3);
+ lua_rawset(L, -3);
}
__LJMP static int hlua_dump_object(struct lua_State *L)
lua_pushstring(L, "f");
if (!hlua_fetches_new(L, htxn, 0))
return 0;
- lua_settable(L, -3);
+ lua_rawset(L, -3);
/* Create the "sf" field that contains a list of stringsafe fetches. */
lua_pushstring(L, "sf");
if (!hlua_fetches_new(L, htxn, 1))
return 0;
- lua_settable(L, -3);
+ lua_rawset(L, -3);
/* Create the "c" field that contains a list of converters. */
lua_pushstring(L, "c");
if (!hlua_converters_new(L, htxn, 0))
return 0;
- lua_settable(L, -3);
+ lua_rawset(L, -3);
/* Create the "sc" field that contains a list of stringsafe converters. */
lua_pushstring(L, "sc");
if (!hlua_converters_new(L, htxn, 1))
return 0;
- lua_settable(L, -3);
+ lua_rawset(L, -3);
/* Create the "req" field that contains the request channel object. */
lua_pushstring(L, "req");
if (!hlua_channel_new(L, &s->req))
return 0;
- lua_settable(L, -3);
+ lua_rawset(L, -3);
/* Create the "res" field that contains the response channel object. */
lua_pushstring(L, "res");
if (!hlua_channel_new(L, &s->res))
return 0;
- lua_settable(L, -3);
+ lua_rawset(L, -3);
/* Creates the HTTP object is the current proxy allows http. */
lua_pushstring(L, "http");
}
else
lua_pushnil(L);
- lua_settable(L, -3);
+ lua_rawset(L, -3);
/* Pop a class sesison metatable and affect it to the userdata. */
lua_rawgeti(L, LUA_REGISTRYINDEX, class_txn_ref);
hlua_class_function(gL.T, "lookup", hlua_map_lookup);
hlua_class_function(gL.T, "slookup", hlua_map_slookup);
- lua_settable(gL.T, -3);
+ lua_rawset(gL.T, -3);
/* Register previous table in the registry with reference and named entry. */
lua_pushvalue(gL.T, -1); /* Copy the -1 entry and push it on the stack. */
hlua_class_function(gL.T, "get_in_len", hlua_channel_get_in_len);
hlua_class_function(gL.T, "get_out_len", hlua_channel_get_out_len);
- lua_settable(gL.T, -3);
+ lua_rawset(gL.T, -3);
/* Register previous table in the registry with reference and named entry. */
lua_pushvalue(gL.T, -1); /* Copy the -1 entry and push it on the stack. */
lua_pushstring(gL.T, trash.str);
lua_pushlightuserdata(gL.T, sf);
lua_pushcclosure(gL.T, hlua_run_sample_fetch, 1);
- lua_settable(gL.T, -3);
+ lua_rawset(gL.T, -3);
}
- lua_settable(gL.T, -3);
+ lua_rawset(gL.T, -3);
/* Register previous table in the registry with reference and named entry. */
lua_pushvalue(gL.T, -1); /* Copy the -1 entry and push it on the stack. */
lua_pushstring(gL.T, trash.str);
lua_pushlightuserdata(gL.T, sc);
lua_pushcclosure(gL.T, hlua_run_sample_conv, 1);
- lua_settable(gL.T, -3);
+ lua_rawset(gL.T, -3);
}
- lua_settable(gL.T, -3);
+ lua_rawset(gL.T, -3);
/* Register previous table in the registry with reference and named entry. */
lua_pushvalue(gL.T, -1); /* Copy the -1 entry and push it on the stack. */
hlua_class_function(gL.T, "res_set_header", hlua_http_res_set_hdr);
hlua_class_function(gL.T, "res_set_status", hlua_http_res_set_status);
- lua_settable(gL.T, -3);
+ lua_rawset(gL.T, -3);
/* Register previous table in the registry with reference and named entry. */
lua_pushvalue(gL.T, -1); /* Copy the -1 entry and push it on the stack. */
hlua_class_function(gL.T, "Warning", hlua_txn_log_warning);
hlua_class_function(gL.T, "Alert", hlua_txn_log_alert);
- lua_settable(gL.T, -3);
+ lua_rawset(gL.T, -3);
/* Register previous table in the registry with reference and named entry. */
lua_pushvalue(gL.T, -1); /* Copy the -1 entry and push it on the stack. */
hlua_class_function(gL.T, "setoption", hlua_socket_setoption);
hlua_class_function(gL.T, "settimeout", hlua_socket_settimeout);
- lua_settable(gL.T, -3); /* Push the last 2 entries in the table at index -3 */
+ lua_rawset(gL.T, -3); /* Push the last 2 entries in the table at index -3 */
/* Register the garbage collector entry. */
lua_pushstring(gL.T, "__gc");
lua_pushcclosure(gL.T, hlua_socket_gc, 0);
- lua_settable(gL.T, -3); /* Push the last 2 entries in the table at index -3 */
+ lua_rawset(gL.T, -3); /* Push the last 2 entries in the table at index -3 */
/* Register previous table in the registry with reference and named entry. */
lua_pushvalue(gL.T, -1); /* Copy the -1 entry and push it on the stack. */