Modifications made to the lua-5.1 sources: 1. Added the LUA_CALLINSINDEX global table @ -10001 - fast method for looking up functions using numerical indices (especially when using multiple lua envs that expect to use the same set of call-ins) - not exposed directly to the lua code - avoids a name lookup into LUA_GLOBALS - avoids a double lookup into LUA_REGISTRYINDEX 2. Added: 'int lua_setuserdataextra(lua_State* L, int idx, void* extra)' 'void* lua_getuserdataextra(lua_State* L, int idx)' - faster userdata type checks - used to avoid luaL_checkudata() LUA_REGISTRY lookups - usually used with: 'static const char* typeName;' pointers - extra defaults to NULL, and lua_getuserdataextra() returns NULL if the object at the idx location is not a userdata object. 3. Added: 'typedef unsigned int lua_Hash' 'lua_Hash lua_calchash(const char* s, size_t l)' 'void lua_pushhstring(lua_State *L, lua_Hash h, const char *s, size_t l)' 'const char* lua_tohstring(lua_State *L, size_t* len, lua_Hash* hash)' - precalculated string hashes 4. Applied: '__usedindex' patch (with a little cleanup) 5. Added: '__rawset' metatag, applies to rawset(), and several table.xxx() calls