PyAPI: add function to check any mathutils type
[blender.git] / source / blender / python / mathutils / mathutils.h
index d1fb6dcdb82157d76b661be53cf56094171fa999..ec927a9e31614c4adcd5404eddf54ce352014bf3 100644 (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 *);