Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Xiangquan <xiaoxiangquan@gmail.com>2011-08-31 11:31:02 +0400
committerXiao Xiangquan <xiaoxiangquan@gmail.com>2011-08-31 11:31:02 +0400
commit5b91a783cf0ec132398a2767d3419d675e5126b5 (patch)
treea1328b870f29827f777565bcdcdb6c2674598552 /source/blender/python/generic/blf_py_api.c
parent241dc35f0edc60e75118feb75d2be3c08a3343e4 (diff)
fix for windows locale setting
Diffstat (limited to 'source/blender/python/generic/blf_py_api.c')
-rw-r--r--source/blender/python/generic/blf_py_api.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c
index a389fda924e..7bc115f943c 100644
--- a/source/blender/python/generic/blf_py_api.c
+++ b/source/blender/python/generic/blf_py_api.c
@@ -380,15 +380,9 @@ PyDoc_STRVAR(py_blf_gettext_doc,
static PyObject *py_blf_gettext(PyObject *UNUSED(self), PyObject *args)
{
char* msgid;
- char* msgstr;
- char* error_handle=NULL;
-
if (!PyArg_ParseTuple(args, "s:blf.gettext", &msgid))
return NULL;
-
- msgstr = BLF_gettext( msgid );
-
- return PyUnicode_DecodeUTF8( msgstr, strlen(msgstr), error_handle );
+ return PyUnicode_FromString( BLF_gettext( msgid ) );
}
PyDoc_STRVAR(py_blf_fake_gettext_doc,
@@ -403,13 +397,11 @@ PyDoc_STRVAR(py_blf_fake_gettext_doc,
);
static PyObject *py_blf_fake_gettext(PyObject *UNUSED(self), PyObject *args)
{
- char* msgid;
- char* error_handle = NULL;
-
- if (!PyArg_ParseTuple(args, "s:blf.gettext", &msgid))
+ const char* msgid;
+ if (!PyArg_ParseTuple(args, "s:blf.fake_gettext", &msgid))
return NULL;
- return PyUnicode_DecodeUTF8( msgid, strlen(msgid), error_handle );
+ return PyUnicode_FromString( msgid );
}
/*----------------------------MODULE INIT-------------------------*/