[Bf-committers] exppython, OS X
Michael Velikanje
bf-committers@blender.org
Sun, 06 Jul 2003 19:10:04 -0800
Hi
After my last post:
>>
Message: 6
Date: Sat, 05 Jul 2003 23:23:17 -0800
From: Michael Velikanje <mikev@gci.net>
To: bf-committers@blender.org
Subject: [Bf-committers] exppython, OS X
Reply-To: bf-committers@blender.org
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
partial of the last post
<<
I downloaded the files that I modified, from cvs, then started to
restore the files one by one starting at the top of the list, until
blender crashed on start up. Doing so I located the file that was
causing a crash on startup of blender on my system.
"Text.h" is the offending file, something about NULL in that file
causes blender to crash on startup, on my system, patching Text.h with
the following patch restores all back to happiness for me.:
Index: blender/source/blender/python/api2_2x/Text.h
===================================================================
RCS file:
/cvsroot/bf-blender/blender/source/blender/python/api2_2x/Text.h,v
retrieving revision 1.10
diff -c -r1.10 Text.h
*** blender/source/blender/python/api2_2x/Text.h 5 Jul 2003 01:18:41
-0000 1.10
--- blender/source/blender/python/api2_2x/Text.h 7 Jul 2003 02:50:38
-0000
***************
*** 152,157 ****
--- 152,184 ----
/
************************************************************************
*****/
/* Python Text_Type structure definition:
*/
/
************************************************************************
*****/
+ #ifdef __APPLE__
+ PyTypeObject Text_Type =
+ {
+ PyObject_HEAD_INIT(&PyType_Type)
+ 0, /* ob_size */
+ "Blender Text", /* tp_name */
+ sizeof (BPy_Text), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)Text_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ (getattrfunc)Text_getAttr, /* tp_getattr */
+ (setattrfunc)Text_setAttr, /* tp_setattr */
+ (cmpfunc)Text_compare, /* tp_compare */
+ (reprfunc)Text_repr, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_as_hash */
+ 0,0,0,0,0,0,
+ 0, /* tp_doc */
+ 0,0,0,0,0,0,
+ BPy_Text_methods, /* tp_methods */
+ 0, /* tp_members */
+ };
+
+ #else
PyTypeObject Text_Type =
{
PyObject_HEAD_INIT(NULL)
***************
*** 176,181 ****
--- 203,209 ----
BPy_Text_methods, /* tp_methods */
0, /* tp_members */
};
+ #endif /* __APPLE__ */
static int Text_IsLinked(BPy_Text *self);
Again there may be a more elegant solution to this but I don't have the
coding skills to do it ;) and it may be my use of Python2.3a causing
the problem on my system. I'm including the patch on the off chance
that someone else using OS X may have a similar problem.
Michael Velikanje