[ctypes-commit] ctypes/source/libffi_msvc win32.c,1.3,1.4
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2004-05-18 20:03:41
|
Update of /cvsroot/ctypes/ctypes/source/libffi_msvc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26950 Modified Files: win32.c Log Message: Critial bug fix. Index: win32.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/libffi_msvc/win32.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** win32.c 7 May 2004 19:54:02 -0000 1.3 --- win32.c 18 May 2004 20:03:31 -0000 1.4 *************** *** 52,60 **** push esi // NEW: this register must be preserved across function calls // XXX SAVE ESP NOW! ! mov esi, esp // Make room for all of the new args. mov ecx, [ebp+16] ! sub esp, ecx mov eax, esp --- 52,60 ---- push esi // NEW: this register must be preserved across function calls // XXX SAVE ESP NOW! ! mov esi, esp // save stack pointer before the call // Make room for all of the new args. mov ecx, [ebp+16] ! sub esp, ecx // sub esp, bytes mov eax, esp *************** *** 81,85 **** // If the return value pointer is NULL, assume no return value. ! cmp [ebp + 24], 0 jne sc_retint --- 81,89 ---- // If the return value pointer is NULL, assume no return value. ! /* ! Intel asm is weird. We have to explicitely specify 'DWORD PTR' in the nexr instruction, ! otherwise only one BYTE will be compared (instead of a DWORD)! ! */ ! cmp DWORD PTR [ebp + 24], 0 jne sc_retint *************** *** 191,195 **** // If the return value pointer is NULL, assume no return value. ! cmp [ebp + 24], 0 jne sc_retint --- 195,203 ---- // If the return value pointer is NULL, assume no return value. ! /* ! Intel asm is weird. We have to explicitely specify 'DWORD PTR' in the nexr instruction, ! otherwise only one BYTE will be compared (instead of a DWORD)! ! */ ! cmp DWORD PTR [ebp + 24], 0 jne sc_retint |