use hex value for shim index key

This commit is contained in:
Cengiz Can 2018-10-16 08:37:27 +03:00
parent eea2de2a1a
commit 290f3f2494
2 changed files with 2 additions and 2 deletions

View File

@ -851,7 +851,7 @@ void shimInitialize(lua_State* L)
// Find the 'SHIM' entry in the registry.
const Table* reg = hvalue(&G(L)->l_registry);
const Node* n = findNode(reg, 'S' + 'H' + 'I' + 'M');
const Node* n = findNode(reg, 0x5348494D); // equal to 'SHIM'
assert(n != NULL);
g_shimTable = (const LuaFunctionTable_t*)n->i_val.value_.p;

View File

@ -194,7 +194,7 @@ int premake_init(lua_State* L)
#endif
lua_pushlightuserdata(L, &s_shimTable);
lua_rawseti(L, LUA_REGISTRYINDEX, 'S' + 'H' + 'I' + 'M');
lua_rawseti(L, LUA_REGISTRYINDEX, 0x5348494D); // equal to 'SHIM'
/* push the application metadata */
lua_pushstring(L, LUA_COPYRIGHT);