From fe529d43fec0cd225d0cf5c90f8099adadfc6710 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 15 Mar 2011 01:48:01 +0000 Subject: fix for building on some configurations. --- source/blender/python/intern/bpy_library.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/python/intern') diff --git a/source/blender/python/intern/bpy_library.c b/source/blender/python/intern/bpy_library.c index 9bd5cded038..d216c449250 100644 --- a/source/blender/python/intern/bpy_library.c +++ b/source/blender/python/intern/bpy_library.c @@ -102,7 +102,7 @@ PyTypeObject bpy_lib_Type = { NULL, /* reprfunc tp_str; */ /* will only use these if this is a subtype of a py class */ - PyObject_GenericGetAttr, /* getattrofunc tp_getattro; */ + NULL /*PyObject_GenericGetAttr is assigned later */, /* getattrofunc tp_getattro; */ NULL, /* setattrofunc tp_setattro; */ /* Functions to access object as input/output buffer */ @@ -357,6 +357,9 @@ int bpy_lib_init(PyObject *mod_par) static PyMethodDef load_meth= {"load", (PyCFunction)bpy_lib_load, METH_STATIC|METH_VARARGS|METH_KEYWORDS, bpy_lib_load_doc}; PyModule_AddObject(mod_par, "_library_load", PyCFunction_New(&load_meth, NULL)); + /* some compilers dont like accessing this directly, delay assignment */ + bpy_lib_Type.tp_getattro= PyObject_GenericGetAttr; + if(PyType_Ready(&bpy_lib_Type) < 0) return -1; -- cgit v1.2.3