[Bf-python] Python VC compilation...

Willian Padovani Germano wgermano at ig.com.br
Mon Jun 2 22:14:06 CEST 2003


On Sat, 2003-05-31 às 08:00, Simon Clitherow wrote:
> I've started to modify the VC6 project files to compile in this new python
> stuff.
(...)
> Basically, VC doesn't like the PyObject_HEAD_INIT(&PyType_Type) statements,
> preferring instead PyObject_HEAD_INIT(NULL) and having the additional
> initialization in the init() functions.
> 
> Attached is a diff file which gets Windows compiling.  Currently the changes
> are encapsulated in #ifdef's but if this method can compile successfully on
> other platforms, maybe it is better to use it globally?

Hi, Simon

I updated all files locally and will commit the changes later today. 
Yes, I used it globally, because that is the way the old (current in
Blender 2.27) implementation did.  At least in Linux it compiles fine,
and it'd be surprising if some system complains, because though a little
awkward, the indirect way still looks like proper C.  I had changed to
PyObject_HEAD_INIT(&PyType_Type), because I saw that in Python's own
source code (so maybe there's some other way around or they simply don't
use VC / cygwin to compile Python binaries ???).  Anyway, going back to
the way you advice is probably enough.

Thanks for catching this one : ).

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list