diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-07-02 00:55:32 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-07-02 00:55:32 +0400 |
commit | 666ce6de80935c614c7e700c6a3f9775edb15ac2 (patch) | |
tree | 92b9b6402bacfa8165ab85076a5a13715dff2390 | |
parent | 594c8802d748dc0701af491e8a2c590f2d2e0038 (diff) |
needed for building with py2
-rw-r--r-- | source/blender/python/generic/matrix.c | 4 | ||||
-rw-r--r-- | source/blender/python/generic/vector.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/python/generic/matrix.c b/source/blender/python/generic/matrix.c index 34d29dacdd1..5bdbf804618 100644 --- a/source/blender/python/generic/matrix.c +++ b/source/blender/python/generic/matrix.c @@ -1182,7 +1182,11 @@ 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*/ diff --git a/source/blender/python/generic/vector.c b/source/blender/python/generic/vector.c index 5abc68c63ca..b4c74787e05 100644 --- a/source/blender/python/generic/vector.c +++ b/source/blender/python/generic/vector.c @@ -1897,7 +1897,11 @@ PyTypeObject vector_Type = { &Vector_NumMethods, /* PyNumberMethods *tp_as_number; */ &Vector_SeqMethods, /* PySequenceMethods *tp_as_sequence; */ +#if (PY_VERSION_HEX >= 0x03000000) &Vector_AsMapping, /* PyMappingMethods *tp_as_mapping; */ +#else + NULL, +#endif /* More standard operations (here for binary compatibility) */ |