[issue3945] compile error in _fileio.c (cygwin)

2008-09-23 Thread Hirokazu Yamamoto

Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment:

Thanks, fixed in r66566(trunk).

--
resolution: accepted -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3945] compile error in _fileio.c (cygwin)

2008-09-23 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

OK, please apply!

--
keywords:  -needs review
resolution:  -> accepted

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3945] compile error in _fileio.c (cygwin)

2008-09-23 Thread Hirokazu Yamamoto

Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment:

>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.

I Undarstand.

How about the attached patch?

Added file: http://bugs.python.org/file11571/_fileio.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3945] compile error in _fileio.c (cygwin)

2008-09-23 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

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).

--
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3945] compile error in _fileio.c (cygwin)

2008-09-23 Thread Hirokazu Yamamoto

New submission from Hirokazu Yamamoto <[EMAIL PROTECTED]>:

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.

#define PyObject_HEAD_INIT(type)\
{ _PyObject_EXTRA_INIT  \
1, type },

#define PyVarObject_HEAD_INIT(type, size)   \
{ PyObject_HEAD_INIT(type) size },

--
components: Build
files: _fileio.patch
keywords: easy, needs review, patch
messages: 73639
nosy: ocean-city
severity: normal
status: open
title: compile error in _fileio.c (cygwin)
versions: Python 2.6
Added file: http://bugs.python.org/file11569/_fileio.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com