[Python-3000] PyObject_HEAD_INIT

Roger Binns rogerb at rogerbinns.com
Fri Nov 14 19:22:01 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin v. Löwis wrote:
>> Also why not remove PyObject_HEAD_INIT from Python 3 headers so that if
>> it is used then the compile fails?
> 
> It's still needed for non-var objects.

Wouldn't a var object have PyVarObject_HEAD and a non-var object have
PyObject_HEAD?

Coming from Python 2, I would expect the example as currently documented
to be perfectly correctly:

  http://docs.python.org/dev/3.0/extending/newtypes.html

It isn't a var object and doesn't use the var form of the macros.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkkdwcYACgkQmOOfHg372QSbPwCcC1V+v7x0clfJmRUaPiP+IvB0
msoAn1r5smhNdmXxENaYL5Y40h/QNHPB
=lqEM
-----END PGP SIGNATURE-----



More information about the Python-3000 mailing list