aboutsummaryrefslogtreecommitdiff
path: root/lang/python30/files/patch-modules_selectmodule.c
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2008-09-08 00:14:06 +0000
committerMartin Wilke <miwi@FreeBSD.org>2008-09-08 00:14:06 +0000
commit8a1ff65b9b4abb36af6477b5c168037be07d4f71 (patch)
treeb9ac213a94e3a8e1c94343b9c5297f42639bc33e /lang/python30/files/patch-modules_selectmodule.c
parent07d5244e8b5f934bc45867d9c55e8e55d26af59e (diff)
Notes
Diffstat (limited to 'lang/python30/files/patch-modules_selectmodule.c')
-rw-r--r--lang/python30/files/patch-modules_selectmodule.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lang/python30/files/patch-modules_selectmodule.c b/lang/python30/files/patch-modules_selectmodule.c
new file mode 100644
index 000000000000..446241f05a97
--- /dev/null
+++ b/lang/python30/files/patch-modules_selectmodule.c
@@ -0,0 +1,16 @@
+--- Modules/selectmodule.c.orig 2006-07-10 02:18:57.000000000 +0100
++++ Modules/selectmodule.c 2008-08-30 10:39:43.000000000 +0100
+@@ -349,10 +349,12 @@
+ {
+ Py_ssize_t i, pos;
+ PyObject *key, *value;
++ struct pollfd *old_ufds = self->ufds;
+
+ self->ufd_len = PyDict_Size(self->dict);
+- PyMem_Resize(self->ufds, struct pollfd, self->ufd_len);
++ PyMem_RESIZE(self->ufds, struct pollfd, self->ufd_len);
+ if (self->ufds == NULL) {
++ self->ufds = old_ufds;
+ PyErr_NoMemory();
+ return 0;
+ }