+/*----- Python version compatibility hacks --------------------------------*/
+
+/* The handy `Py_TYPE' and `Py_SIZE' macros turned up in 2.6. Define them if
+ * they're not already here.
+ */
+#ifndef Py_TYPE
+# define Py_TYPE(obj) (((PyObject *)(obj))->ob_type)
+#endif
+#ifndef Py_SIZE
+# define Py_SIZE(obj) (((PyVarObject *)(obj))->ob_size)
+#endif
+