[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17986] branches/blender2.5/blender/source /blender/python: 2.5 - Compiling 'hacks' for py
Joshua Leung
aligorith at gmail.com
Sun Dec 21 11:36:30 CET 2008
Revision: 17986
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17986
Author: aligorith
Date: 2008-12-21 11:36:29 +0100 (Sun, 21 Dec 2008)
Log Message:
-----------
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.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/python/BPY_extern.h
branches/blender2.5/blender/source/blender/python/intern/bpy_idprop.c
Modified: branches/blender2.5/blender/source/blender/python/BPY_extern.h
===================================================================
--- branches/blender2.5/blender/source/blender/python/BPY_extern.h 2008-12-21 10:33:24 UTC (rev 17985)
+++ branches/blender2.5/blender/source/blender/python/BPY_extern.h 2008-12-21 10:36:29 UTC (rev 17986)
@@ -49,6 +49,7 @@
struct bConstraintTarget; /* DNA_constraint_types.h*/
struct Script; /* DNA_screen_types.h */
struct BPyMenu;
+struct bContext;
#ifdef __cplusplus
extern "C" {
#endif
Modified: branches/blender2.5/blender/source/blender/python/intern/bpy_idprop.c
===================================================================
--- branches/blender2.5/blender/source/blender/python/intern/bpy_idprop.c 2008-12-21 10:33:24 UTC (rev 17985)
+++ branches/blender2.5/blender/source/blender/python/intern/bpy_idprop.c 2008-12-21 10:36:29 UTC (rev 17986)
@@ -60,8 +60,8 @@
} 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 @@
for (i=0; i<len; i++) {
key = PySequence_GetItem(keys, i);
pval = PySequence_GetItem(vals, i);
- if (!PyUnicode_Check(key)) {
+ if (/*!PyUnicode_Check(key)*/1) {
IDP_FreeProperty(prop);
MEM_freeN(prop);
Py_XDECREF(keys);
@@ -114,7 +114,7 @@
Py_XDECREF(pval);
return "invalid element in subgroup dict template!";
}
- if (BPy_IDProperty_Map_ValidateAndCreate(_PyUnicode_AsString(key), prop, pval)) {
+ if (/*BPy_IDProperty_Map_ValidateAndCreate(PyUnicode_AsString(key), prop, pval)*/0) {
IDP_FreeProperty(prop);
MEM_freeN(prop);
Py_XDECREF(keys);
@@ -143,12 +143,12 @@
return EXPP_ReturnIntError( PyExc_TypeError,
"unsubscriptable object");
- if (!PyUnicode_Check(key))
+ if (/*!PyUnicode_Check(key)*/1)
return EXPP_ReturnIntError( PyExc_TypeError,
"only strings are allowed as subgroup keys" );
if (val == NULL) {
- IDProperty *pkey = IDP_GetPropertyFromGroup(prop, _PyUnicode_AsString(key));
+ IDProperty *pkey = 0;//IDP_GetPropertyFromGroup(prop, PyUnicode_AsString(key));
if (pkey) {
IDP_RemFromGroup(prop, pkey);
IDP_FreeProperty(pkey);
@@ -157,7 +157,7 @@
} else return EXPP_ReturnIntError( PyExc_RuntimeError, "property not found in group" );
}
- err = BPy_IDProperty_Map_ValidateAndCreate(_PyUnicode_AsString(key), prop, val);
+ //err = BPy_IDProperty_Map_ValidateAndCreate(_PyUnicode_AsString(key), prop, val);
if (err) return EXPP_ReturnIntError( PyExc_RuntimeError, err );
return 0;
More information about the Bf-blender-cvs
mailing list