classification
Title: r58034 breaks building _ctypes with the upstream libffi.
Type: compile error Stage:
Components: Extension Modules Versions: Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: theller Nosy List: doko, theller
Priority: normal Keywords: patch

Created on 2007-10-25 07:04 by doko, last changed 2007-10-25 19:48 by theller. This issue is now closed.

Messages (3)
msg56736 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2007-10-25 07:04
This breaks building _ctypes with the upstream libffi.

r58034 | thomas.heller | 2007-09-07 08:32:17 +0200 (Fr, 07 Sep 2007) | 1
line

Add a 'c_longdouble' type to the ctypes module.


gcc -pthread -fPIC -fno-strict-aliasing -g -Wall -Wstrict-prototypes
-I/usr/include -I.
-I/home/pybot/buildarea-armeabi/trunk.klose-linux-armeabi/build/./Include
-I./Include -IInclude -I. -I/usr/local/include
-I/home/pybot/buildarea-armeabi/trunk.klose-linux-armeabi/build/Include
-I/home/pybot/buildarea-armeabi/trunk.klose-linux-armeabi/build -c
/home/pybot/buildarea-armeabi/trunk.klose-linux-armeabi/build/Modules/_ctypes/cfield.c
-o
build/temp.linux-armv5tel-2.6/home/pybot/buildarea-armeabi/trunk.klose-linux-armeabi/build/Modules/_ctypes/cfield.o
/home/pybot/buildarea-armeabi/trunk.klose-linux-armeabi/build/Modules/_ctypes/cfield.c:1756:
error: redefinition of 'ffi_type_double'
/home/pybot/buildarea-armeabi/trunk.klose-linux-armeabi/build/Modules/_ctypes/cfield.c:1755:
error: previous definition of 'ffi_type_double' was here

ffi.h has:
#if 0
extern ffi_type ffi_type_longdouble;
#else
#define ffi_type_longdouble ffi_type_double
#endif
msg56737 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2007-10-25 07:09
Index: Modules/_ctypes/cfield.c
===================================================================
--- Modules/_ctypes/cfield.c    (revision 58651)
+++ Modules/_ctypes/cfield.c    (working copy)
@@ -1753,6 +1753,9 @@
 
 ffi_type ffi_type_float = { sizeof(float), FLOAT_ALIGN, FFI_TYPE_FLOAT };
 ffi_type ffi_type_double = { sizeof(double), DOUBLE_ALIGN,
FFI_TYPE_DOUBLE };
+#ifdef ffi_type_longdouble
+#undef ffi_type_longdouble
+#endif
 ffi_type ffi_type_longdouble = { sizeof(long double), LONGDOUBLE_ALIGN,
                                 FFI_TYPE_LONGDOUBLE };
msg56752 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2007-10-25 19:48
Maybe I should give up the idea to define the ffi_type_... types myself.
Committed as rev 58655.  Thanks.
History
Date User Action Args
2007-10-25 19:48:41thellersetstatus: open -> closed
resolution: accepted
messages: + msg56752
2007-10-25 08:17:06dokosetkeywords: + patch
2007-10-25 07:09:57dokosetmessages: + msg56737
2007-10-25 07:05:11dokosettype: compile error
2007-10-25 07:04:59dokocreate