[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20680] branches/soc-2009-kazanbas/source/ blender/python/intern/bpy_interface.c: Small fix: use PyUnicode_FromString instead of PyString_FromString in
Arystanbek Dyussenov
arystan.d at gmail.com
Sat Jun 6 18:22:55 CEST 2009
Revision: 20680
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20680
Author: kazanbas
Date: 2009-06-06 18:22:54 +0200 (Sat, 06 Jun 2009)
Log Message:
-----------
Small fix: use PyUnicode_FromString instead of PyString_FromString in
Python 3.x builds. PyString_FromString no longer exists in Python 3.x.
Modified Paths:
--------------
branches/soc-2009-kazanbas/source/blender/python/intern/bpy_interface.c
Modified: branches/soc-2009-kazanbas/source/blender/python/intern/bpy_interface.c
===================================================================
--- branches/soc-2009-kazanbas/source/blender/python/intern/bpy_interface.c 2009-06-06 16:18:19 UTC (rev 20679)
+++ branches/soc-2009-kazanbas/source/blender/python/intern/bpy_interface.c 2009-06-06 16:22:54 UTC (rev 20680)
@@ -168,8 +168,12 @@
/* PyErr_Clear(); is called below */
ok = 0;
}
-
+
+#if PY_MAJOR_VERSION >= 3
+ dir = PyUnicode_FromString( dirname );
+#else
dir = PyString_FromString( dirname );
+#endif
if (ok && PySequence_Contains(path, dir)==0) { /* Only add if we need to */
if (PyList_Append( path, dir ) != 0) /* decref below */
More information about the Bf-blender-cvs
mailing list