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:
authorCampbell Barton <ideasman42@gmail.com>2011-03-09 07:58:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-09 07:58:44 +0300
commite5ee4faad330ae9c119e0f30179915c1f81f8a68 (patch)
treed9339a829b7ced357c8da0a62ddc6aba1305335e /source/blender/python/intern/bpy_interface.c
parent44648fdf99937cf257346c01b335cdeb5510d85a (diff)
update for blender as a py module & python 3.2
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r--source/blender/python/intern/bpy_interface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index b54771f6b0e..58e277d9766 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -724,13 +724,13 @@ void bpy_module_delay_init(PyObject *bpy_proxy)
{
const int argc= 1;
const char *argv[2];
-
- const char *filename_rel= PyModule_GetFilename(bpy_proxy); /* can be relative */
+ PyObject *filename_obj= PyModule_GetFilenameObject(bpy_proxy); /* updating the module dict below will loose the reference to __file__ */
+ const char *filename_rel= _PyUnicode_AsString(filename_obj); /* can be relative */
char filename_abs[1024];
BLI_strncpy(filename_abs, filename_rel, sizeof(filename_abs));
BLI_path_cwd(filename_abs);
-
+
argv[0]= filename_abs;
argv[1]= NULL;