You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The patch is OK, even if the second half is not necessary:
PyType_Ready() takes care of the ob_type field.
Adding brackets in the macro would be wrong: the object layout is
different between 2.6 and 3.0.
3.0 does not have this problem because _fileio.c is built-in and linked
with the core interpreter (2.6 leaves it in an extension module).
ocean-city commented on Sep 23, 2008
ocean-citymannequin
MannequinAuthor
More actions
The patch is OK, even if the second half is not necessary:
PyType_Ready() takes care of the ob_type field.
Oh, OK.
Adding brackets in the macro would be wrong: the object layout is
different between 2.6 and 3.0.
Activity
ocean-city commentedon Sep 23, 2008
Currently, fails to build trunk on cygwin.
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -I. -
I/home/WhiteRabbit/python-dev/trunk/./Include -I. -IInclude -I./Include
-I/home/
WhiteRabbit/python-dev/trunk/Include
-I/home/WhiteRabbit/python-dev/trunk -c /ho
me/WhiteRabbit/python-dev/trunk/Modules/_fileio.c -o
build/temp.cygwin-1.5.25-i6
86-2.6/home/WhiteRabbit/python-dev/trunk/Modules/_fileio.o
/home/WhiteRabbit/python-dev/trunk/Modules/_fileio.c:834: error:
initializer ele
ment is not constant
/home/WhiteRabbit/python-dev/trunk/Modules/_fileio.c:834: error: (near
initializ
ation for `PyFileIO_Type.ob_type')
To fix this, attached patch is needed. Or, like py3k, using following
Py_???_HEAD_INIT (surrounded with bracket) might fix this issue in trunk.
amauryfa commentedon Sep 23, 2008
The patch is OK, even if the second half is not necessary:
PyType_Ready() takes care of the ob_type field.
Adding brackets in the macro would be wrong: the object layout is
different between 2.6 and 3.0.
3.0 does not have this problem because _fileio.c is built-in and linked
with the core interpreter (2.6 leaves it in an extension module).
ocean-city commentedon Sep 23, 2008
Oh, OK.
I Undarstand.
How about the attached patch?
amauryfa commentedon Sep 23, 2008
OK, please apply!
ocean-city commentedon Sep 23, 2008
Thanks, fixed in r66566(trunk).