PyAPI: add function to check any mathutils type

Also add CheckExact versions of type checking macros.
This commit is contained in:
2017-11-29 16:09:46 +11:00
parent 26a64ba23a
commit c17c6557b4
7 changed files with 19 additions and 6 deletions

View File

@@ -78,6 +78,10 @@ typedef struct {
#include "mathutils_Euler.h"
#include "mathutils_Color.h"
/* avoid checking all types */
#define BaseMathObject_CheckExact(v) \
(Py_TYPE(v)->tp_dealloc == (destructor)BaseMathObject_dealloc)
PyObject *BaseMathObject_owner_get(BaseMathObject *self, void *);
PyObject *BaseMathObject_is_wrapped_get(BaseMathObject *self, void *);
PyObject *BaseMathObject_is_frozen_get(BaseMathObject *self, void *);