[Bf-committers] exppython, OS X

Michael Velikanje bf-committers@blender.org
Sat, 05 Jul 2003 23:23:17 -0800


Hi,
By monkey mousing around in the code for exppython I was able to get it 
to compile (without crashing on startup), again, finally! By going into 
the following files:
Armature.h
BGL.h
Bone.c
Build.c
Camera.c
constant.c
Curve.h
Draw.h
Effect.h
Image.c
Ipo.h
Lamp.c
Material.c
matrix.c
Metaball.c
NMesh.c
Object.c
Particle.c
rgbTuple.c
Scene.c
Text.h
vector.c
Wave.c
World.c
  and adding an #ifdef __APPLE__  :
#ifdef __APPLE__

               PyTypeObject buffer_Type={
                PyObject_HEAD_INIT(&PyType_Type)
                0,                /*ob_size*/
                "Buffer",         /*tp_name*/
                sizeof(Buffer),   /*tp_basicsize*/

#else
              PyTypeObject buffer_Type={
               PyObject_HEAD_INIT(NULL)
               0,                /*ob_size*/
               "Buffer",         /*tp_name*/
               sizeof(Buffer),   /*tp_basicsize*/
#endif
as an example.
By changing PyObject_HEAD_INIT(NULL) to 
PyObject_HEAD_INIT(&PyType_Type) it compiles and works! really well, 
nice job! I don't know what it is about that NULL but my PowerBook does 
not like it, it may have something to do with my using python2.3a.
There may be a more elegant solution, but I don't know it, after all 
I'm only a monkey mouse. ;)

Michael Velikanje