| 98 | |
| 99 | #if LUA_VERSION_NUM ==503 |
| 100 | LUA_API int lua_setfenv(lua_State *L, int idx) |
| 101 | { |
| 102 | int type = lua_type(L, idx); |
| 103 | if(type == LUA_TUSERDATA || type == LUA_TFUNCTION) |
| 104 | { |
| 105 | lua_setupvalue(L, idx, 1); |
| 106 | return 1; |
| 107 | } |
| 108 | else |
| 109 | { |
| 110 | return 0; |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | LUA_API uint32_t xlua_objlen (lua_State *L, int idx) { |
| 115 | return (uint32_t)lua_rawlen (L, idx); |
nothing calls this directly
no test coverage detected