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:
Diffstat (limited to 'source/blender/python/generic/Mathutils.c')
-rw-r--r--source/blender/python/generic/Mathutils.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/source/blender/python/generic/Mathutils.c b/source/blender/python/generic/Mathutils.c
index 53077659655..f53fd66ba99 100644
--- a/source/blender/python/generic/Mathutils.c
+++ b/source/blender/python/generic/Mathutils.c
@@ -94,7 +94,6 @@ struct PyMethodDef M_Mathutils_methods[] = {
/*----------------------------MODULE INIT-------------------------*/
/* from can be Blender.Mathutils or GameLogic.Mathutils for the BGE */
-#if (PY_VERSION_HEX >= 0x03000000)
static struct PyModuleDef M_Mathutils_module_def = {
PyModuleDef_HEAD_INIT,
"Mathutils", /* m_name */
@@ -106,21 +105,13 @@ static struct PyModuleDef M_Mathutils_module_def = {
0, /* m_clear */
0, /* m_free */
};
-#endif
-PyObject *Mathutils_Init(const char *from)
+PyObject *Mathutils_Init(void)
{
PyObject *submodule;
//seed the generator for the rand function
BLI_srand((unsigned int) (PIL_check_seconds_timer() * 0x7FFFFFFF));
-
-#if (PY_VERSION_HEX < 0x03000000)
- vector_Type.tp_flags |= Py_TPFLAGS_CHECKTYPES;
- matrix_Type.tp_flags |= Py_TPFLAGS_CHECKTYPES;
- euler_Type.tp_flags |= Py_TPFLAGS_CHECKTYPES;
- quaternion_Type.tp_flags |= Py_TPFLAGS_CHECKTYPES;
-#endif
if( PyType_Ready( &vector_Type ) < 0 )
return NULL;
@@ -131,12 +122,8 @@ PyObject *Mathutils_Init(const char *from)
if( PyType_Ready( &quaternion_Type ) < 0 )
return NULL;
-#if (PY_VERSION_HEX >= 0x03000000)
submodule = PyModule_Create(&M_Mathutils_module_def);
PyDict_SetItemString(PySys_GetObject("modules"), M_Mathutils_module_def.m_name, submodule);
-#else
- submodule = Py_InitModule3(from, M_Mathutils_methods, M_Mathutils_doc);
-#endif
/* each type has its own new() function */
PyModule_AddObject( submodule, "Vector", (PyObject *)&vector_Type );