From 170b748c81b7e76fefb74d5ae2fe45767085aa91 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Sun, 21 Dec 2008 10:36:29 +0000 Subject: 2.5 - Compiling 'hacks' for py * Unicode calls in bpy_idprop.c were causing linking errors here. Probably Py-libs for windows would need recompiling with unicode before we can enable this. For now, commented out the offending calls. --- source/blender/python/BPY_extern.h | 1 + source/blender/python/intern/bpy_idprop.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'source') diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index 8561f9d1b55..296eb6296a7 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -49,6 +49,7 @@ struct bConstraintOb; /* DNA_constraint_types.h */ struct bConstraintTarget; /* DNA_constraint_types.h*/ struct Script; /* DNA_screen_types.h */ struct BPyMenu; +struct bContext; #ifdef __cplusplus extern "C" { #endif diff --git a/source/blender/python/intern/bpy_idprop.c b/source/blender/python/intern/bpy_idprop.c index e7e8a5fd8b5..a5fca06d402 100644 --- a/source/blender/python/intern/bpy_idprop.c +++ b/source/blender/python/intern/bpy_idprop.c @@ -60,8 +60,8 @@ static char *BPy_IDProperty_Map_ValidateAndCreate(char *name, IDProperty *group, } else if (PyLong_Check(ob)) { val.i = (int) PyLong_AsLong(ob); prop = IDP_New(IDP_INT, val, name); - } else if (PyUnicode_Check(ob)) { - val.str = _PyUnicode_AsString(ob); + } else if (/*PyUnicode_Check(ob)*/0) { + //val.str = _PyUnicode_AsString(ob); prop = IDP_New(IDP_STRING, val, name); } else if (PySequence_Check(ob)) { PyObject *item; @@ -105,7 +105,7 @@ static char *BPy_IDProperty_Map_ValidateAndCreate(char *name, IDProperty *group, for (i=0; i