fixed logging and tag id handling
[swftools.git] / lib / python / pyutils.h
index 6f56a13..571c0b9 100644 (file)
@@ -6,9 +6,14 @@
 
 extern int verbose;
 
+void setVerbosity(int verbose);
+
 char* setError(char*format, ...);
 void mylog(char*format, ...);
 PyObject* FindMethodMore(PyObject*ret, PyMethodDef f[], PyObject*self, char* a);
 void dummy_dealloc(PyObject* self);
 PyMethodDef* addMethods(PyMethodDef*obj1, PyMethodDef*obj2);
+
+#define PY_CHECK_TYPE(o,c) ((o)->ob_type == (c))
+#define PY_ASSERT_TYPE(o,c) {if((o)->ob_type != (c)) {printf("Invalid type: %08x(%d)", (int)(o), (o)->ob_refcnt);exit(1);}}
 #endif