diff -durN old/python_msgobj.c new/python_msgobj.c
--- old/python_msgobj.c	2012-12-03 01:04:19.000000000 +0200
+++ new/python_msgobj.c	2012-12-03 01:54:09.019810209 +0200
@@ -30,10 +30,6 @@
 
 #include "structmember.h"
 
-#ifndef Py_TYPE
-#define Py_TYPE(ob)               (((PyObject*)(ob))->ob_type)
-#endif
-
 typedef struct {
     PyObject_HEAD
     struct sip_msg *msg;
@@ -527,7 +523,7 @@
 int
 python_msgobj_init(void)
 {
-    Py_TYPE((void*)(&MSGtype)) = &PyType_Type;
+    MSGtype.ob_type = &PyType_Type;
     if (PyType_Ready(&MSGtype) < 0)
         return -1;
     return 0;
