apr_lua.c revision fa21815c2fce84c8a6f56bccd3ad4c0537c6f1fd
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * make a userdata out of a C pointer, and vice versa
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * instead of using lightuserdata
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd#define lua_boxpointer(L,u) (*(void **)(lua_newuserdata(L, sizeof(void *))) = (u))
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding#define lua_unboxpointer(L,i) (*(void **)(lua_touserdata(L, i)))
2261031aa94be82d7e6b1b8c367afc1b282317f5ianh apr_table_t* t = (apr_table_t*)lua_unboxpointer(L, index);
cccd31fa4a72fe23cc3249c06db181b274a55a69gsteinvoid apl_push_apr_table(lua_State* L, const char *name, apr_table_t *t) {
09fe0b69d3d1e8c8041c9ce99ee77b8b44b5e3b1fielding luaL_openlib(L, "apr_table", lua_table_methods, 0);