Commit 9236a668 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

mscoree: Make vtable and tokens local declarations arch independent.

parent a4d95074
...@@ -984,13 +984,13 @@ static void CDECL ReallyFixupVTable(struct dll_fixup *fixup) ...@@ -984,13 +984,13 @@ static void CDECL ReallyFixupVTable(struct dll_fixup *fixup)
if (fixup->fixup->type & COR_VTABLE_32BIT) if (fixup->fixup->type & COR_VTABLE_32BIT)
{ {
DWORD *vtable = fixup->vtable; void **vtable = fixup->vtable;
DWORD *tokens = fixup->tokens; ULONG_PTR *tokens = fixup->tokens;
for (i=0; i<fixup->fixup->count; i++) for (i=0; i<fixup->fixup->count; i++)
{ {
TRACE("%x\n", tokens[i]); TRACE("%#lx\n", tokens[i]);
vtable[i] = PtrToUint(mono_marshal_get_vtfixup_ftnptr( vtable[i] = mono_marshal_get_vtfixup_ftnptr(
image, tokens[i], fixup->fixup->type)); image, tokens[i], fixup->fixup->type);
} }
} }
...@@ -1029,10 +1029,11 @@ static void FixupVTableEntry(HMODULE hmodule, VTableFixup *vtable_fixup) ...@@ -1029,10 +1029,11 @@ static void FixupVTableEntry(HMODULE hmodule, VTableFixup *vtable_fixup)
fixup->vtable = (BYTE*)hmodule + vtable_fixup->rva; fixup->vtable = (BYTE*)hmodule + vtable_fixup->rva;
fixup->done = FALSE; fixup->done = FALSE;
TRACE("vtable_fixup->type=0x%x\n",vtable_fixup->type);
if (vtable_fixup->type & COR_VTABLE_32BIT) if (vtable_fixup->type & COR_VTABLE_32BIT)
{ {
DWORD *vtable = fixup->vtable; void **vtable = fixup->vtable;
DWORD *tokens; ULONG_PTR *tokens;
int i; int i;
struct vtable_fixup_thunk *thunks = fixup->thunk_code; struct vtable_fixup_thunk *thunks = fixup->thunk_code;
...@@ -1047,7 +1048,7 @@ static void FixupVTableEntry(HMODULE hmodule, VTableFixup *vtable_fixup) ...@@ -1047,7 +1048,7 @@ static void FixupVTableEntry(HMODULE hmodule, VTableFixup *vtable_fixup)
thunks[i].fixup = fixup; thunks[i].fixup = fixup;
thunks[i].function = ReallyFixupVTable; thunks[i].function = ReallyFixupVTable;
thunks[i].vtable_entry = &vtable[i]; thunks[i].vtable_entry = &vtable[i];
vtable[i] = PtrToUint(&thunks[i]); vtable[i] = &thunks[i];
} }
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment