[New-bugs-announce] [issue4385] Py_Object_HEAD_INIT in Py3k

Nick Coghlan report at bugs.python.org
Sat Nov 22 00:43:57 CET 2008


New submission from Nick Coghlan <ncoghlan at gmail.com>:

The memory layout of PyType object's changes in Py3k from the
*compiler's* point of view. This means PyObject_HEAD_INIT can no longer
be used to initialise PyVarObject type definitions.

However, the documentation doesn't point this out (or document
PyVarObject_HEAD_INIT at all), and the compiler warnings currently
generated are not clear. Suggestion is to remove PyObject_HEAD_INIT from
Py3k entirely so this becomes a compile error instead of a warning, and
then better document the situation so extension authors know how to
correctly initialise the affected C structs.

See mailing list thread at:
http://mail.python.org/pipermail/python-3000/2008-November/015241.html

----------
components: Interpreter Core
messages: 76224
nosy: ncoghlan
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Py_Object_HEAD_INIT in Py3k
type: behavior
versions: Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4385>
_______________________________________


More information about the New-bugs-announce mailing list