[Python-checkins] r47205 - python/trunk/Modules/_ctypes/libffi_msvc/fficonfig.h python/trunk/Modules/_ctypes/libffi_msvc/ffitarget.h
thomas.heller
python-checkins at python.org
Mon Jul 3 10:04:05 CEST 2006
Author: thomas.heller
Date: Mon Jul 3 10:04:05 2006
New Revision: 47205
Modified:
python/trunk/Modules/_ctypes/libffi_msvc/fficonfig.h
python/trunk/Modules/_ctypes/libffi_msvc/ffitarget.h
Log:
Fixes so that _ctypes can be compiled with the MingW compiler.
It seems that the definition of '__attribute__(x)' was responsible for
the compiler ignoring the '__fastcall' attribute on the
ffi_closure_SYSV function in libffi_msvc/ffi.c, took me quite some
time to figure this out.
Modified: python/trunk/Modules/_ctypes/libffi_msvc/fficonfig.h
==============================================================================
--- python/trunk/Modules/_ctypes/libffi_msvc/fficonfig.h (original)
+++ python/trunk/Modules/_ctypes/libffi_msvc/fficonfig.h Mon Jul 3 10:04:05 2006
@@ -3,8 +3,10 @@
/* fficonfig.h. Generated automatically by configure. */
/* fficonfig.h.in. Generated automatically from configure.in by autoheader. */
-/* Defines for MSVC */
+/* Define this for MSVC, but not for mingw32! */
+#ifdef _MSC_VER
#define __attribute__(x) /* */
+#endif
#define alloca _alloca
/*----------------------------------------------------------------*/
Modified: python/trunk/Modules/_ctypes/libffi_msvc/ffitarget.h
==============================================================================
--- python/trunk/Modules/_ctypes/libffi_msvc/ffitarget.h (original)
+++ python/trunk/Modules/_ctypes/libffi_msvc/ffitarget.h Mon Jul 3 10:04:05 2006
@@ -71,11 +71,7 @@
#define FFI_TRAMPOLINE_SIZE 24
#define FFI_NATIVE_RAW_API 0
#else
-#ifdef _MSC_VER
-# define FFI_TRAMPOLINE_SIZE 15
-#else
-# define FFI_TRAMPOLINE_SIZE 10
-#endif
+#define FFI_TRAMPOLINE_SIZE 15
#define FFI_NATIVE_RAW_API 1 /* x86 has native raw api support */
#endif
More information about the Python-checkins
mailing list