|
@@ -20,19 +20,16 @@
|
|
*
|
|
*
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
+#include <Python.h>
|
|
|
|
+
|
|
#include "../../action.h"
|
|
#include "../../action.h"
|
|
#include "../../mem/mem.h"
|
|
#include "../../mem/mem.h"
|
|
#include "../../sr_module.h"
|
|
#include "../../sr_module.h"
|
|
#include "../../dset.h"
|
|
#include "../../dset.h"
|
|
#include "../../parser/msg_parser.h"
|
|
#include "../../parser/msg_parser.h"
|
|
|
|
|
|
-#include <Python.h>
|
|
|
|
#include "structmember.h"
|
|
#include "structmember.h"
|
|
|
|
|
|
-#ifndef Py_TYPE
|
|
|
|
-#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
typedef struct {
|
|
typedef struct {
|
|
PyObject_HEAD
|
|
PyObject_HEAD
|
|
struct sip_msg *msg;
|
|
struct sip_msg *msg;
|
|
@@ -526,7 +523,7 @@ static PyTypeObject MSGtype = {
|
|
int
|
|
int
|
|
python_msgobj_init(void)
|
|
python_msgobj_init(void)
|
|
{
|
|
{
|
|
- Py_TYPE((void*)(&MSGtype)) = &PyType_Type;
|
|
|
|
|
|
+ MSGtype.ob_type = &PyType_Type;
|
|
if (PyType_Ready(&MSGtype) < 0)
|
|
if (PyType_Ready(&MSGtype) < 0)
|
|
return -1;
|
|
return -1;
|
|
return 0;
|
|
return 0;
|