[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50373] trunk/blender/source/blender/ python/generic/py_capi_utils.c: fix [#31856] movieclips.load(filepath=None) or value crash Blender
Campbell Barton
ideasman42 at gmail.com
Tue Sep 4 07:36:08 CEST 2012
Revision: 50373
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50373
Author: campbellbarton
Date: 2012-09-04 05:36:07 +0000 (Tue, 04 Sep 2012)
Log Message:
-----------
fix [#31856] movieclips.load(filepath=None) or value crash Blender
workaround for python bug/inconsistency
Modified Paths:
--------------
trunk/blender/source/blender/python/generic/py_capi_utils.c
Modified: trunk/blender/source/blender/python/generic/py_capi_utils.c
===================================================================
--- trunk/blender/source/blender/python/generic/py_capi_utils.c 2012-09-04 03:26:12 UTC (rev 50372)
+++ trunk/blender/source/blender/python/generic/py_capi_utils.c 2012-09-04 05:36:07 UTC (rev 50373)
@@ -402,6 +402,15 @@
if (PyBytes_Check(py_str)) {
return PyBytes_AS_STRING(py_str);
}
+#ifdef WIN32
+ /* bug [#31856] oddly enough, Python3.2 --> 3.3 on Windows will throw an
+ * exception here this needs to be fixed in python:
+ * see: bugs.python.org/issue15859 */
+ else if (!PyUnicode_Check(py_str)) {
+ PyErr_BadArgument();
+ return NULL;
+ }
+#endif
else if ((*coerce = PyUnicode_EncodeFSDefault(py_str))) {
return PyBytes_AS_STRING(*coerce);
}
More information about the Bf-blender-cvs
mailing list