From a81be2075f6304c18838fa2d26380342ba2f7894 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 13 Oct 2010 14:14:22 +0000 Subject: use PyC_UnicodeFromByte for bpy.app.tempdir incase of non utf-8 filepath --- source/blender/python/intern/bpy_app.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/python') diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index 6a6b5277d9f..6c4e190673c 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -30,6 +30,8 @@ #include "BKE_global.h" #include "structseq.h" +#include "../generic/py_capi_utils.h" + #ifdef BUILD_DATE extern char build_date[]; extern char build_time[]; @@ -146,7 +148,7 @@ static PyObject *bpy_app_tempdir_get(PyObject *self, void *closure) (void)(self); (void)(closure); - return PyUnicode_FromString(btempdir); + return PyC_UnicodeFromByte(btempdir); } PyGetSetDef bpy_app_debug_getset= {"debug", bpy_app_debug_get, bpy_app_debug_set, "Boolean, set when blender is running in debug mode (started with -d)", NULL}; -- cgit v1.2.3