Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r53179:f1509bac7c63
Date: 2012-03-04 15:03 +0100
http://bitbucket.org/pypy/pypy/changeset/f1509bac7c63/

Log:    These names are fine, but are bound to conflict with some other name
        from somewhere else :-( Added a 'ffi_' prefix.

diff --git a/pypy/translator/c/src/libffi_msvc/ffi.c 
b/pypy/translator/c/src/libffi_msvc/ffi.c
--- a/pypy/translator/c/src/libffi_msvc/ffi.c
+++ b/pypy/translator/c/src/libffi_msvc/ffi.c
@@ -71,31 +71,31 @@
          switch ((*p_arg)->type)
            {
            case FFI_TYPE_SINT8:
-             *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
+             *(signed int *) argp = (signed int)*(ffi_SINT8 *)(* p_argv);
              break;
 
            case FFI_TYPE_UINT8:
-             *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
+             *(unsigned int *) argp = (unsigned int)*(ffi_UINT8 *)(* p_argv);
              break;
 
            case FFI_TYPE_SINT16:
-             *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
+             *(signed int *) argp = (signed int)*(ffi_SINT16 *)(* p_argv);
              break;
 
            case FFI_TYPE_UINT16:
-             *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
+             *(unsigned int *) argp = (unsigned int)*(ffi_UINT16 *)(* p_argv);
              break;
 
            case FFI_TYPE_SINT32:
-             *(signed int *) argp = (signed int)*(SINT32 *)(* p_argv);
+             *(signed int *) argp = (signed int)*(ffi_SINT32 *)(* p_argv);
              break;
 
            case FFI_TYPE_UINT32:
-             *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
+             *(unsigned int *) argp = (unsigned int)*(ffi_UINT32 *)(* p_argv);
              break;
 
            case FFI_TYPE_STRUCT:
-             *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
+             *(unsigned int *) argp = (unsigned int)*(ffi_UINT32 *)(* p_argv);
              break;
 
            default:
diff --git a/pypy/translator/c/src/libffi_msvc/ffi_common.h 
b/pypy/translator/c/src/libffi_msvc/ffi_common.h
--- a/pypy/translator/c/src/libffi_msvc/ffi_common.h
+++ b/pypy/translator/c/src/libffi_msvc/ffi_common.h
@@ -56,16 +56,18 @@
 } extended_cif;
 
 /* Terse sized type definitions.  */
-typedef unsigned int UINT8  __attribute__((__mode__(__QI__)));
-typedef signed int   SINT8  __attribute__((__mode__(__QI__)));
-typedef unsigned int UINT16 __attribute__((__mode__(__HI__)));
-typedef signed int   SINT16 __attribute__((__mode__(__HI__)));
-typedef unsigned int UINT32 __attribute__((__mode__(__SI__)));
-typedef signed int   SINT32 __attribute__((__mode__(__SI__)));
-typedef unsigned int UINT64 __attribute__((__mode__(__DI__)));
-typedef signed int   SINT64 __attribute__((__mode__(__DI__)));
+/* Fix for PyPy: these names are fine, but are bound to conflict with
+ * some other name from somewhere else :-(  Added a 'ffi_' prefix. */
+typedef unsigned int ffi_UINT8  __attribute__((__mode__(__QI__)));
+typedef signed int   ffi_SINT8  __attribute__((__mode__(__QI__)));
+typedef unsigned int ffi_UINT16 __attribute__((__mode__(__HI__)));
+typedef signed int   ffi_SINT16 __attribute__((__mode__(__HI__)));
+typedef unsigned int ffi_UINT32 __attribute__((__mode__(__SI__)));
+typedef signed int   ffi_SINT32 __attribute__((__mode__(__SI__)));
+typedef unsigned int ffi_UINT64 __attribute__((__mode__(__DI__)));
+typedef signed int   ffi_SINT64 __attribute__((__mode__(__DI__)));
 
-typedef float FLOAT32;
+typedef float ffi_FLOAT32;
 
 
 #ifdef __cplusplus
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to