MCPcopy Create free account
hub / github.com/apache/httpd / ap_lua_init

Function ap_lua_init

modules/lua/lua_apr.c:88–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86
87
88int ap_lua_init(lua_State *L, apr_pool_t *p)
89{
90 luaL_newmetatable(L, "Apr.Table");
91#if LUA_VERSION_NUM < 502
92 luaL_register(L, "apr_table", lua_table_methods);
93#else
94 luaL_newlib(L, lua_table_methods);
95#endif
96 lua_pushstring(L, "__index");
97 lua_pushstring(L, "get");
98 lua_gettable(L, 2);
99 lua_settable(L, 1);
100
101 lua_pushstring(L, "__newindex");
102 lua_pushstring(L, "set");
103 lua_gettable(L, 2);
104 lua_settable(L, 1);
105
106 return 0;
107}
108
109
110

Callers 1

lua_open_callbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected