diff options
Diffstat (limited to 'source/blender/python/generic/matrix.c')
-rw-r--r-- | source/blender/python/generic/matrix.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/source/blender/python/generic/matrix.c b/source/blender/python/generic/matrix.c index 5bdbf804618..d4153243516 100644 --- a/source/blender/python/generic/matrix.c +++ b/source/blender/python/generic/matrix.c @@ -998,8 +998,6 @@ static PySequenceMethods Matrix_SeqMethods = { }; - -#if (PY_VERSION_HEX >= 0x03000000) static PyObject *Matrix_subscript(MatrixObject* self, PyObject* item) { if (PyIndex_Check(item)) { @@ -1071,11 +1069,8 @@ static PyMappingMethods Matrix_AsMapping = { (binaryfunc)Matrix_subscript, (objobjargproc)Matrix_ass_subscript }; -#endif /* (PY_VERSION_HEX >= 0x03000000) */ - -#if (PY_VERSION_HEX >= 0x03000000) static PyNumberMethods Matrix_NumMethods = { (binaryfunc) Matrix_add, /*nb_add*/ (binaryfunc) Matrix_sub, /*nb_subtract*/ @@ -1112,33 +1107,6 @@ static PyNumberMethods Matrix_NumMethods = { 0, /* nb_inplace_true_divide */ 0, /* nb_index */ }; -#else -static PyNumberMethods Matrix_NumMethods = { - (binaryfunc) Matrix_add, /* __add__ */ - (binaryfunc) Matrix_sub, /* __sub__ */ - (binaryfunc) Matrix_mul, /* __mul__ */ - (binaryfunc) 0, /* __div__ */ - (binaryfunc) 0, /* __mod__ */ - (binaryfunc) 0, /* __divmod__ */ - (ternaryfunc) 0, /* __pow__ */ - (unaryfunc) 0, /* __neg__ */ - (unaryfunc) 0, /* __pos__ */ - (unaryfunc) 0, /* __abs__ */ - (inquiry) 0, /* __nonzero__ */ - (unaryfunc) Matrix_inv, /* __invert__ */ - (binaryfunc) 0, /* __lshift__ */ - (binaryfunc) 0, /* __rshift__ */ - (binaryfunc) 0, /* __and__ */ - (binaryfunc) 0, /* __xor__ */ - (binaryfunc) 0, /* __or__ */ - /*(coercion)*/ 0, /* __coerce__ */ - (unaryfunc) 0, /* __int__ */ - (unaryfunc) 0, /* __long__ */ - (unaryfunc) 0, /* __float__ */ - (unaryfunc) 0, /* __oct__ */ - (unaryfunc) 0, /* __hex__ */ -}; -#endif static PyObject *Matrix_getRowSize( MatrixObject * self, void *type ) { @@ -1164,13 +1132,7 @@ static PyGetSetDef Matrix_getseters[] = { /*------------------PY_OBECT DEFINITION--------------------------*/ PyTypeObject matrix_Type = { -#if (PY_VERSION_HEX >= 0x02060000) PyVarObject_HEAD_INIT(NULL, 0) -#else - /* python 2.5 and below */ - PyObject_HEAD_INIT( NULL ) /* required py macro */ - 0, /* ob_size */ -#endif "matrix", /*tp_name*/ sizeof(MatrixObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ @@ -1182,11 +1144,7 @@ PyTypeObject matrix_Type = { (reprfunc) Matrix_repr, /*tp_repr*/ &Matrix_NumMethods, /*tp_as_number*/ &Matrix_SeqMethods, /*tp_as_sequence*/ -#if (PY_VERSION_HEX >= 0x03000000) &Matrix_AsMapping, /*tp_as_mapping*/ -#else - 0, -#endif 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ |