trunk sync r7363

This commit is contained in:
The_E committed 2011-07-20 18:07:56 +00:00
1 parent a115bdf287
commit 08063525c7
19 files changed
+265 -331

No files matched your search

+8 -4
View File
@@ -13157,6 +13157,7 @@ static int ade_index_handler(lua_State *L)
char *type_name = NULL;
uint ade_id = UINT_MAX;
int mtb_ldx = INT_MAX;
ade_table_entry* entry = 0;
//*****STEP 1: Check for user-defined objects
if(lua_istable(L, obj_ldx) && !ADE_SETTING_VAR)
@@ -13176,7 +13177,7 @@ static int ade_index_handler(lua_State *L)
lua_pushcfunction(L, ade_friendly_error);
int err_ldx = lua_gettop(L);
int i;
//*****WMC - go for the type name
lua_pushstring(L, "__adeid");
lua_rawget(L, mtb_ldx);
@@ -13184,7 +13185,10 @@ static int ade_index_handler(lua_State *L)
{
ade_id = (uint) lua_tonumber(L, -1);
if(ade_id < Ade_table_entries.size())
type_name = Ade_table_entries[ade_id].Name;
{
entry = &Ade_table_entries[ade_id];
type_name = entry->Name;
}
}
lua_pop(L, 1);
@@ -13196,7 +13200,7 @@ static int ade_index_handler(lua_State *L)
//Get userdata sig
char *ud = (char *)lua_touserdata(L, obj_ldx);
ODATA_SIG_TYPE sig = *(ODATA_SIG_TYPE*)(ud + Ade_table_entries[ade_id].Value.Object.size);
ODATA_SIG_TYPE sig = *(ODATA_SIG_TYPE*)(ud + entry->Value.Object.size);
//Now use it to index the table with that #
lua_pushnumber(L, sig);
@@ -13319,7 +13323,7 @@ static int ade_index_handler(lua_State *L)
//Get userdata sig
char *ud = (char *)lua_touserdata(L, obj_ldx);
ODATA_SIG_TYPE sig = *(ODATA_SIG_TYPE*)(ud + Ade_table_entries[ade_id].Value.Object.size);
ODATA_SIG_TYPE sig = *(ODATA_SIG_TYPE*)(ud + entry->Value.Object.size);
//Now use it to index the table with that #
lua_pushnumber(L, sig);