diff options
author | Xin LI <delphij@FreeBSD.org> | 2007-09-24 04:11:23 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2007-09-24 04:11:23 +0000 |
commit | 77c0462f92af4f64ca6808a991720be852add6b7 (patch) | |
tree | ab07829e10302226e9336a1dbc225a8afa44aa7f | |
parent | 0c282539d7c4f472a5cfcba14e48c075990173bd (diff) | |
download | ports-77c0462f92af4f64ca6808a991720be852add6b7.tar.gz ports-77c0462f92af4f64ca6808a991720be852add6b7.zip |
Notes
-rw-r--r-- | devel/py-kqueue/Makefile | 2 | ||||
-rw-r--r-- | devel/py-kqueue/files/patch-kqsyscallmodule.c | 61 |
2 files changed, 62 insertions, 1 deletions
diff --git a/devel/py-kqueue/Makefile b/devel/py-kqueue/Makefile index 690cab471171..6f5789174ad6 100644 --- a/devel/py-kqueue/Makefile +++ b/devel/py-kqueue/Makefile @@ -7,7 +7,7 @@ PORTNAME= kqueue PORTVERSION= 1.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel python MASTER_SITES= http://ox.eicat.ca/~dgilbert/files/ PKGNAMEPREFIX= py- diff --git a/devel/py-kqueue/files/patch-kqsyscallmodule.c b/devel/py-kqueue/files/patch-kqsyscallmodule.c new file mode 100644 index 000000000000..2d458217df00 --- /dev/null +++ b/devel/py-kqueue/files/patch-kqsyscallmodule.c @@ -0,0 +1,61 @@ +--- ./kqsyscallmodule.c.orig 2001-01-29 10:59:50.000000000 +0800 ++++ ./kqsyscallmodule.c 2007-08-24 18:27:42.250897722 +0800 +@@ -42,6 +42,12 @@ + + #define MAX_KEVENTS 512 + ++#if PYTHON_API_VERSION <= 1007 ++ /* 1.5 compatibility */ ++#define PyObject_New PyObject_NEW ++#define PyObject_Del PyMem_DEL ++#endif ++ + // ---------------------------------------------------------------------- + // KQEventObject + // ---------------------------------------------------------------------- +@@ -58,8 +64,7 @@ + static KQEventObject * + newKQEventObject (PyObject *arg) + { +- // return PyObject_New (KQEventObject, &KQEvent_Type); +- return PyObject_NEW (KQEventObject, &KQEvent_Type); ++ return PyObject_New (KQEventObject, &KQEvent_Type); + } + + /* KQEvent methods */ +@@ -67,8 +72,7 @@ + static void + KQEvent_dealloc(KQEventObject *self) + { +- // PyObject_Del(self); +- PyMem_DEL (self); ++ PyObject_Del(self); + } + + // -------------------------------------------------------------------------------- +@@ -201,14 +205,14 @@ + static KQueueObject * + newKQueueObject (PyObject *arg) + { +- KQueueObject * self = PyObject_NEW (KQueueObject, &KQueue_Type); ++ KQueueObject * self = PyObject_New(KQueueObject, &KQueue_Type); + if (!self) { + PyErr_SetFromErrno (PyExc_MemoryError); + return NULL; + } else { + int kqfd = kqueue(); + if (kqfd < 0) { +- PyMem_DEL (self); ++ PyObject_Del(self); + PyErr_SetFromErrno (PyExc_OSError); + return NULL; + } else { +@@ -234,7 +238,7 @@ + KQueue_dealloc(KQueueObject *self) + { + close (self->fd); +- PyMem_DEL(self); ++ PyObject_Del(self); + } + + /* Call kevent(2) and do appropriate digestion of lists. */ |