diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-08-10 04:07:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-08-10 04:07:34 +0400 |
commit | 7440fee85c6d2d4c5854337ae8bf3ed7aea91a50 (patch) | |
tree | 1fdb611fab96ba5e7af468233211722e0ca2bb58 /source/blender/python/intern/bpy_interface.c | |
parent | f71ef0874413d30be6d6e74500aa0a45628b5188 (diff) |
remove python2.x support
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 4fd4c9caf89..e37e75ab80d 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -14,8 +14,6 @@ #include "compile.h" /* for the PyCodeObject */ #include "eval.h" /* for PyEval_EvalCode */ -#include "bpy_compat.h" - #include "bpy_rna.h" #include "bpy_operator.h" #include "bpy_ui.h" @@ -149,18 +147,11 @@ static void bpy_init_modules( void ) /* stand alone utility modules not related to blender directly */ - Geometry_Init("Geometry"); - Mathutils_Init("Mathutils"); - BGL_Init("BGL"); + Geometry_Init(); + Mathutils_Init(); + BGL_Init(); } -#if (PY_VERSION_HEX < 0x02050000) -PyObject *PyImport_ImportModuleLevel(char *name, void *a, void *b, void *c, int d) -{ - return PyImport_ImportModule(name); -} -#endif - void BPY_update_modules( void ) { PyObject *mod= PyImport_ImportModuleLevel("bpy", NULL, NULL, NULL, 0); @@ -244,9 +235,7 @@ void BPY_start_python( int argc, char **argv ) Py_Initialize( ); -#if (PY_VERSION_HEX < 0x03000000) - PySys_SetArgv( argc, argv); -#else + // PySys_SetArgv( argc, argv); // broken in py3, not a huge deal /* sigh, why do python guys not have a char** version anymore? :( */ { int i; @@ -258,7 +247,6 @@ void BPY_start_python( int argc, char **argv ) PySys_SetObject("argv", py_argv); Py_DECREF(py_argv); } -#endif /* Initialize thread support (also acquires lock) */ PyEval_InitThreads(); |