summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortg <tg@FreeBSD.org>2002-01-16 12:22:20 +0000
committertg <tg@FreeBSD.org>2002-01-16 12:22:20 +0000
commit0a22f63713162d9eadd45d487155fa9b01df04a8 (patch)
treefc962a217476bdf9f563482d34d471157f7591cb
parent8214b84f188854763ca73d614b2808b87dfa7c1c (diff)
downloadFreeBSD-ports-0a22f63713162d9eadd45d487155fa9b01df04a8.zip
FreeBSD-ports-0a22f63713162d9eadd45d487155fa9b01df04a8.tar.gz
Implement PyObject_DelItemString(), which was obviously forgotten for
Python-2.2. This will fix at least the metakit port. Bump PORTREVISION. Obtained from: Python CVS tree
-rw-r--r--lang/python-devel/Makefile1
-rw-r--r--lang/python-devel/files/patch-PyObject_DelItemString56
-rw-r--r--lang/python/Makefile1
-rw-r--r--lang/python/files/patch-PyObject_DelItemString56
-rw-r--r--lang/python22/Makefile1
-rw-r--r--lang/python22/files/patch-PyObject_DelItemString56
-rw-r--r--lang/python23/Makefile1
-rw-r--r--lang/python23/files/patch-PyObject_DelItemString56
-rw-r--r--lang/python24/Makefile1
-rw-r--r--lang/python24/files/patch-PyObject_DelItemString56
-rw-r--r--lang/python25/Makefile1
-rw-r--r--lang/python25/files/patch-PyObject_DelItemString56
-rw-r--r--lang/python26/Makefile1
-rw-r--r--lang/python26/files/patch-PyObject_DelItemString56
-rw-r--r--lang/python27/Makefile1
-rw-r--r--lang/python27/files/patch-PyObject_DelItemString56
-rw-r--r--lang/python30/Makefile1
-rw-r--r--lang/python30/files/patch-PyObject_DelItemString56
-rw-r--r--lang/python31/Makefile1
-rw-r--r--lang/python31/files/patch-PyObject_DelItemString56
-rw-r--r--lang/python32/Makefile1
-rw-r--r--lang/python32/files/patch-PyObject_DelItemString56
22 files changed, 627 insertions, 0 deletions
diff --git a/lang/python-devel/Makefile b/lang/python-devel/Makefile
index 87763fb..555e6a9 100644
--- a/lang/python-devel/Makefile
+++ b/lang/python-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= python
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= http://www.python.org/ftp/python/${PORTVERSION}/ \
http://SunSITE.Informatik.RWTH-Aachen.DE/python/ftp/python/${PORTVERSION}/
diff --git a/lang/python-devel/files/patch-PyObject_DelItemString b/lang/python-devel/files/patch-PyObject_DelItemString
new file mode 100644
index 0000000..4f81f9e
--- /dev/null
+++ b/lang/python-devel/files/patch-PyObject_DelItemString
@@ -0,0 +1,56 @@
+Index: Include/abstract.h
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Include/abstract.h,v
+retrieving revision 2.42
+retrieving revision 2.43
+diff -u -r2.42 -r2.43
+--- Include/abstract.h 28 Nov 2001 16:20:07 -0000 2.42
++++ Include/abstract.h 5 Jan 2002 10:50:30 -0000 2.43
+@@ -445,6 +445,14 @@
+ statement: o[key]=v.
+ */
+
++ DL_IMPORT(int) PyObject_DelItemString(PyObject *o, char *key);
++
++ /*
++ Remove the mapping for object, key, from the object *o.
++ Returns -1 on failure. This is equivalent to
++ the Python statement: del o[key].
++ */
++
+ DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key);
+
+ /*
+Index: Objects/abstract.c
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Objects/abstract.c,v
+retrieving revision 2.93
+retrieving revision 2.94
+diff -u -r2.93 -r2.94
+--- Objects/abstract.c 24 Nov 2001 18:24:47 -0000 2.93
++++ Objects/abstract.c 5 Jan 2002 10:50:30 -0000 2.94
+@@ -174,6 +174,24 @@
+ return -1;
+ }
+
++int
++PyObject_DelItemString(PyObject *o, char *key)
++{
++ PyObject *okey;
++ int ret;
++
++ if (o == NULL || key == NULL) {
++ null_error();
++ return -1;
++ }
++ okey = PyString_FromString(key);
++ if (okey == NULL)
++ return -1;
++ ret = PyObject_DelItem(o, okey);
++ Py_DECREF(okey);
++ return ret;
++}
++
+ int PyObject_AsCharBuffer(PyObject *obj,
+ const char **buffer,
+ int *buffer_len)
diff --git a/lang/python/Makefile b/lang/python/Makefile
index 87763fb..555e6a9 100644
--- a/lang/python/Makefile
+++ b/lang/python/Makefile
@@ -7,6 +7,7 @@
PORTNAME= python
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= http://www.python.org/ftp/python/${PORTVERSION}/ \
http://SunSITE.Informatik.RWTH-Aachen.DE/python/ftp/python/${PORTVERSION}/
diff --git a/lang/python/files/patch-PyObject_DelItemString b/lang/python/files/patch-PyObject_DelItemString
new file mode 100644
index 0000000..4f81f9e
--- /dev/null
+++ b/lang/python/files/patch-PyObject_DelItemString
@@ -0,0 +1,56 @@
+Index: Include/abstract.h
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Include/abstract.h,v
+retrieving revision 2.42
+retrieving revision 2.43
+diff -u -r2.42 -r2.43
+--- Include/abstract.h 28 Nov 2001 16:20:07 -0000 2.42
++++ Include/abstract.h 5 Jan 2002 10:50:30 -0000 2.43
+@@ -445,6 +445,14 @@
+ statement: o[key]=v.
+ */
+
++ DL_IMPORT(int) PyObject_DelItemString(PyObject *o, char *key);
++
++ /*
++ Remove the mapping for object, key, from the object *o.
++ Returns -1 on failure. This is equivalent to
++ the Python statement: del o[key].
++ */
++
+ DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key);
+
+ /*
+Index: Objects/abstract.c
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Objects/abstract.c,v
+retrieving revision 2.93
+retrieving revision 2.94
+diff -u -r2.93 -r2.94
+--- Objects/abstract.c 24 Nov 2001 18:24:47 -0000 2.93
++++ Objects/abstract.c 5 Jan 2002 10:50:30 -0000 2.94
+@@ -174,6 +174,24 @@
+ return -1;
+ }
+
++int
++PyObject_DelItemString(PyObject *o, char *key)
++{
++ PyObject *okey;
++ int ret;
++
++ if (o == NULL || key == NULL) {
++ null_error();
++ return -1;
++ }
++ okey = PyString_FromString(key);
++ if (okey == NULL)
++ return -1;
++ ret = PyObject_DelItem(o, okey);
++ Py_DECREF(okey);
++ return ret;
++}
++
+ int PyObject_AsCharBuffer(PyObject *obj,
+ const char **buffer,
+ int *buffer_len)
diff --git a/lang/python22/Makefile b/lang/python22/Makefile
index 87763fb..555e6a9 100644
--- a/lang/python22/Makefile
+++ b/lang/python22/Makefile
@@ -7,6 +7,7 @@
PORTNAME= python
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= http://www.python.org/ftp/python/${PORTVERSION}/ \
http://SunSITE.Informatik.RWTH-Aachen.DE/python/ftp/python/${PORTVERSION}/
diff --git a/lang/python22/files/patch-PyObject_DelItemString b/lang/python22/files/patch-PyObject_DelItemString
new file mode 100644
index 0000000..4f81f9e
--- /dev/null
+++ b/lang/python22/files/patch-PyObject_DelItemString
@@ -0,0 +1,56 @@
+Index: Include/abstract.h
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Include/abstract.h,v
+retrieving revision 2.42
+retrieving revision 2.43
+diff -u -r2.42 -r2.43
+--- Include/abstract.h 28 Nov 2001 16:20:07 -0000 2.42
++++ Include/abstract.h 5 Jan 2002 10:50:30 -0000 2.43
+@@ -445,6 +445,14 @@
+ statement: o[key]=v.
+ */
+
++ DL_IMPORT(int) PyObject_DelItemString(PyObject *o, char *key);
++
++ /*
++ Remove the mapping for object, key, from the object *o.
++ Returns -1 on failure. This is equivalent to
++ the Python statement: del o[key].
++ */
++
+ DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key);
+
+ /*
+Index: Objects/abstract.c
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Objects/abstract.c,v
+retrieving revision 2.93
+retrieving revision 2.94
+diff -u -r2.93 -r2.94
+--- Objects/abstract.c 24 Nov 2001 18:24:47 -0000 2.93
++++ Objects/abstract.c 5 Jan 2002 10:50:30 -0000 2.94
+@@ -174,6 +174,24 @@
+ return -1;
+ }
+
++int
++PyObject_DelItemString(PyObject *o, char *key)
++{
++ PyObject *okey;
++ int ret;
++
++ if (o == NULL || key == NULL) {
++ null_error();
++ return -1;
++ }
++ okey = PyString_FromString(key);
++ if (okey == NULL)
++ return -1;
++ ret = PyObject_DelItem(o, okey);
++ Py_DECREF(okey);
++ return ret;
++}
++
+ int PyObject_AsCharBuffer(PyObject *obj,
+ const char **buffer,
+ int *buffer_len)
diff --git a/lang/python23/Makefile b/lang/python23/Makefile
index 87763fb..555e6a9 100644
--- a/lang/python23/Makefile
+++ b/lang/python23/Makefile
@@ -7,6 +7,7 @@
PORTNAME= python
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= http://www.python.org/ftp/python/${PORTVERSION}/ \
http://SunSITE.Informatik.RWTH-Aachen.DE/python/ftp/python/${PORTVERSION}/
diff --git a/lang/python23/files/patch-PyObject_DelItemString b/lang/python23/files/patch-PyObject_DelItemString
new file mode 100644
index 0000000..4f81f9e
--- /dev/null
+++ b/lang/python23/files/patch-PyObject_DelItemString
@@ -0,0 +1,56 @@
+Index: Include/abstract.h
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Include/abstract.h,v
+retrieving revision 2.42
+retrieving revision 2.43
+diff -u -r2.42 -r2.43
+--- Include/abstract.h 28 Nov 2001 16:20:07 -0000 2.42
++++ Include/abstract.h 5 Jan 2002 10:50:30 -0000 2.43
+@@ -445,6 +445,14 @@
+ statement: o[key]=v.
+ */
+
++ DL_IMPORT(int) PyObject_DelItemString(PyObject *o, char *key);
++
++ /*
++ Remove the mapping for object, key, from the object *o.
++ Returns -1 on failure. This is equivalent to
++ the Python statement: del o[key].
++ */
++
+ DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key);
+
+ /*
+Index: Objects/abstract.c
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Objects/abstract.c,v
+retrieving revision 2.93
+retrieving revision 2.94
+diff -u -r2.93 -r2.94
+--- Objects/abstract.c 24 Nov 2001 18:24:47 -0000 2.93
++++ Objects/abstract.c 5 Jan 2002 10:50:30 -0000 2.94
+@@ -174,6 +174,24 @@
+ return -1;
+ }
+
++int
++PyObject_DelItemString(PyObject *o, char *key)
++{
++ PyObject *okey;
++ int ret;
++
++ if (o == NULL || key == NULL) {
++ null_error();
++ return -1;
++ }
++ okey = PyString_FromString(key);
++ if (okey == NULL)
++ return -1;
++ ret = PyObject_DelItem(o, okey);
++ Py_DECREF(okey);
++ return ret;
++}
++
+ int PyObject_AsCharBuffer(PyObject *obj,
+ const char **buffer,
+ int *buffer_len)
diff --git a/lang/python24/Makefile b/lang/python24/Makefile
index 87763fb..555e6a9 100644
--- a/lang/python24/Makefile
+++ b/lang/python24/Makefile
@@ -7,6 +7,7 @@
PORTNAME= python
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= http://www.python.org/ftp/python/${PORTVERSION}/ \
http://SunSITE.Informatik.RWTH-Aachen.DE/python/ftp/python/${PORTVERSION}/
diff --git a/lang/python24/files/patch-PyObject_DelItemString b/lang/python24/files/patch-PyObject_DelItemString
new file mode 100644
index 0000000..4f81f9e
--- /dev/null
+++ b/lang/python24/files/patch-PyObject_DelItemString
@@ -0,0 +1,56 @@
+Index: Include/abstract.h
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Include/abstract.h,v
+retrieving revision 2.42
+retrieving revision 2.43
+diff -u -r2.42 -r2.43
+--- Include/abstract.h 28 Nov 2001 16:20:07 -0000 2.42
++++ Include/abstract.h 5 Jan 2002 10:50:30 -0000 2.43
+@@ -445,6 +445,14 @@
+ statement: o[key]=v.
+ */
+
++ DL_IMPORT(int) PyObject_DelItemString(PyObject *o, char *key);
++
++ /*
++ Remove the mapping for object, key, from the object *o.
++ Returns -1 on failure. This is equivalent to
++ the Python statement: del o[key].
++ */
++
+ DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key);
+
+ /*
+Index: Objects/abstract.c
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Objects/abstract.c,v
+retrieving revision 2.93
+retrieving revision 2.94
+diff -u -r2.93 -r2.94
+--- Objects/abstract.c 24 Nov 2001 18:24:47 -0000 2.93
++++ Objects/abstract.c 5 Jan 2002 10:50:30 -0000 2.94
+@@ -174,6 +174,24 @@
+ return -1;
+ }
+
++int
++PyObject_DelItemString(PyObject *o, char *key)
++{
++ PyObject *okey;
++ int ret;
++
++ if (o == NULL || key == NULL) {
++ null_error();
++ return -1;
++ }
++ okey = PyString_FromString(key);
++ if (okey == NULL)
++ return -1;
++ ret = PyObject_DelItem(o, okey);
++ Py_DECREF(okey);
++ return ret;
++}
++
+ int PyObject_AsCharBuffer(PyObject *obj,
+ const char **buffer,
+ int *buffer_len)
diff --git a/lang/python25/Makefile b/lang/python25/Makefile
index 87763fb..555e6a9 100644
--- a/lang/python25/Makefile
+++ b/lang/python25/Makefile
@@ -7,6 +7,7 @@
PORTNAME= python
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= http://www.python.org/ftp/python/${PORTVERSION}/ \
http://SunSITE.Informatik.RWTH-Aachen.DE/python/ftp/python/${PORTVERSION}/
diff --git a/lang/python25/files/patch-PyObject_DelItemString b/lang/python25/files/patch-PyObject_DelItemString
new file mode 100644
index 0000000..4f81f9e
--- /dev/null
+++ b/lang/python25/files/patch-PyObject_DelItemString
@@ -0,0 +1,56 @@
+Index: Include/abstract.h
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Include/abstract.h,v
+retrieving revision 2.42
+retrieving revision 2.43
+diff -u -r2.42 -r2.43
+--- Include/abstract.h 28 Nov 2001 16:20:07 -0000 2.42
++++ Include/abstract.h 5 Jan 2002 10:50:30 -0000 2.43
+@@ -445,6 +445,14 @@
+ statement: o[key]=v.
+ */
+
++ DL_IMPORT(int) PyObject_DelItemString(PyObject *o, char *key);
++
++ /*
++ Remove the mapping for object, key, from the object *o.
++ Returns -1 on failure. This is equivalent to
++ the Python statement: del o[key].
++ */
++
+ DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key);
+
+ /*
+Index: Objects/abstract.c
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Objects/abstract.c,v
+retrieving revision 2.93
+retrieving revision 2.94
+diff -u -r2.93 -r2.94
+--- Objects/abstract.c 24 Nov 2001 18:24:47 -0000 2.93
++++ Objects/abstract.c 5 Jan 2002 10:50:30 -0000 2.94
+@@ -174,6 +174,24 @@
+ return -1;
+ }
+
++int
++PyObject_DelItemString(PyObject *o, char *key)
++{
++ PyObject *okey;
++ int ret;
++
++ if (o == NULL || key == NULL) {
++ null_error();
++ return -1;
++ }
++ okey = PyString_FromString(key);
++ if (okey == NULL)
++ return -1;
++ ret = PyObject_DelItem(o, okey);
++ Py_DECREF(okey);
++ return ret;
++}
++
+ int PyObject_AsCharBuffer(PyObject *obj,
+ const char **buffer,
+ int *buffer_len)
diff --git a/lang/python26/Makefile b/lang/python26/Makefile
index 87763fb..555e6a9 100644
--- a/lang/python26/Makefile
+++ b/lang/python26/Makefile
@@ -7,6 +7,7 @@
PORTNAME= python
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= http://www.python.org/ftp/python/${PORTVERSION}/ \
http://SunSITE.Informatik.RWTH-Aachen.DE/python/ftp/python/${PORTVERSION}/
diff --git a/lang/python26/files/patch-PyObject_DelItemString b/lang/python26/files/patch-PyObject_DelItemString
new file mode 100644
index 0000000..4f81f9e
--- /dev/null
+++ b/lang/python26/files/patch-PyObject_DelItemString
@@ -0,0 +1,56 @@
+Index: Include/abstract.h
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Include/abstract.h,v
+retrieving revision 2.42
+retrieving revision 2.43
+diff -u -r2.42 -r2.43
+--- Include/abstract.h 28 Nov 2001 16:20:07 -0000 2.42
++++ Include/abstract.h 5 Jan 2002 10:50:30 -0000 2.43
+@@ -445,6 +445,14 @@
+ statement: o[key]=v.
+ */
+
++ DL_IMPORT(int) PyObject_DelItemString(PyObject *o, char *key);
++
++ /*
++ Remove the mapping for object, key, from the object *o.
++ Returns -1 on failure. This is equivalent to
++ the Python statement: del o[key].
++ */
++
+ DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key);
+
+ /*
+Index: Objects/abstract.c
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Objects/abstract.c,v
+retrieving revision 2.93
+retrieving revision 2.94
+diff -u -r2.93 -r2.94
+--- Objects/abstract.c 24 Nov 2001 18:24:47 -0000 2.93
++++ Objects/abstract.c 5 Jan 2002 10:50:30 -0000 2.94
+@@ -174,6 +174,24 @@
+ return -1;
+ }
+
++int
++PyObject_DelItemString(PyObject *o, char *key)
++{
++ PyObject *okey;
++ int ret;
++
++ if (o == NULL || key == NULL) {
++ null_error();
++ return -1;
++ }
++ okey = PyString_FromString(key);
++ if (okey == NULL)
++ return -1;
++ ret = PyObject_DelItem(o, okey);
++ Py_DECREF(okey);
++ return ret;
++}
++
+ int PyObject_AsCharBuffer(PyObject *obj,
+ const char **buffer,
+ int *buffer_len)
diff --git a/lang/python27/Makefile b/lang/python27/Makefile
index 87763fb..555e6a9 100644
--- a/lang/python27/Makefile
+++ b/lang/python27/Makefile
@@ -7,6 +7,7 @@
PORTNAME= python
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= http://www.python.org/ftp/python/${PORTVERSION}/ \
http://SunSITE.Informatik.RWTH-Aachen.DE/python/ftp/python/${PORTVERSION}/
diff --git a/lang/python27/files/patch-PyObject_DelItemString b/lang/python27/files/patch-PyObject_DelItemString
new file mode 100644
index 0000000..4f81f9e
--- /dev/null
+++ b/lang/python27/files/patch-PyObject_DelItemString
@@ -0,0 +1,56 @@
+Index: Include/abstract.h
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Include/abstract.h,v
+retrieving revision 2.42
+retrieving revision 2.43
+diff -u -r2.42 -r2.43
+--- Include/abstract.h 28 Nov 2001 16:20:07 -0000 2.42
++++ Include/abstract.h 5 Jan 2002 10:50:30 -0000 2.43
+@@ -445,6 +445,14 @@
+ statement: o[key]=v.
+ */
+
++ DL_IMPORT(int) PyObject_DelItemString(PyObject *o, char *key);
++
++ /*
++ Remove the mapping for object, key, from the object *o.
++ Returns -1 on failure. This is equivalent to
++ the Python statement: del o[key].
++ */
++
+ DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key);
+
+ /*
+Index: Objects/abstract.c
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Objects/abstract.c,v
+retrieving revision 2.93
+retrieving revision 2.94
+diff -u -r2.93 -r2.94
+--- Objects/abstract.c 24 Nov 2001 18:24:47 -0000 2.93
++++ Objects/abstract.c 5 Jan 2002 10:50:30 -0000 2.94
+@@ -174,6 +174,24 @@
+ return -1;
+ }
+
++int
++PyObject_DelItemString(PyObject *o, char *key)
++{
++ PyObject *okey;
++ int ret;
++
++ if (o == NULL || key == NULL) {
++ null_error();
++ return -1;
++ }
++ okey = PyString_FromString(key);
++ if (okey == NULL)
++ return -1;
++ ret = PyObject_DelItem(o, okey);
++ Py_DECREF(okey);
++ return ret;
++}
++
+ int PyObject_AsCharBuffer(PyObject *obj,
+ const char **buffer,
+ int *buffer_len)
diff --git a/lang/python30/Makefile b/lang/python30/Makefile
index 87763fb..555e6a9 100644
--- a/lang/python30/Makefile
+++ b/lang/python30/Makefile
@@ -7,6 +7,7 @@
PORTNAME= python
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= http://www.python.org/ftp/python/${PORTVERSION}/ \
http://SunSITE.Informatik.RWTH-Aachen.DE/python/ftp/python/${PORTVERSION}/
diff --git a/lang/python30/files/patch-PyObject_DelItemString b/lang/python30/files/patch-PyObject_DelItemString
new file mode 100644
index 0000000..4f81f9e
--- /dev/null
+++ b/lang/python30/files/patch-PyObject_DelItemString
@@ -0,0 +1,56 @@
+Index: Include/abstract.h
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Include/abstract.h,v
+retrieving revision 2.42
+retrieving revision 2.43
+diff -u -r2.42 -r2.43
+--- Include/abstract.h 28 Nov 2001 16:20:07 -0000 2.42
++++ Include/abstract.h 5 Jan 2002 10:50:30 -0000 2.43
+@@ -445,6 +445,14 @@
+ statement: o[key]=v.
+ */
+
++ DL_IMPORT(int) PyObject_DelItemString(PyObject *o, char *key);
++
++ /*
++ Remove the mapping for object, key, from the object *o.
++ Returns -1 on failure. This is equivalent to
++ the Python statement: del o[key].
++ */
++
+ DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key);
+
+ /*
+Index: Objects/abstract.c
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Objects/abstract.c,v
+retrieving revision 2.93
+retrieving revision 2.94
+diff -u -r2.93 -r2.94
+--- Objects/abstract.c 24 Nov 2001 18:24:47 -0000 2.93
++++ Objects/abstract.c 5 Jan 2002 10:50:30 -0000 2.94
+@@ -174,6 +174,24 @@
+ return -1;
+ }
+
++int
++PyObject_DelItemString(PyObject *o, char *key)
++{
++ PyObject *okey;
++ int ret;
++
++ if (o == NULL || key == NULL) {
++ null_error();
++ return -1;
++ }
++ okey = PyString_FromString(key);
++ if (okey == NULL)
++ return -1;
++ ret = PyObject_DelItem(o, okey);
++ Py_DECREF(okey);
++ return ret;
++}
++
+ int PyObject_AsCharBuffer(PyObject *obj,
+ const char **buffer,
+ int *buffer_len)
diff --git a/lang/python31/Makefile b/lang/python31/Makefile
index 87763fb..555e6a9 100644
--- a/lang/python31/Makefile
+++ b/lang/python31/Makefile
@@ -7,6 +7,7 @@
PORTNAME= python
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= http://www.python.org/ftp/python/${PORTVERSION}/ \
http://SunSITE.Informatik.RWTH-Aachen.DE/python/ftp/python/${PORTVERSION}/
diff --git a/lang/python31/files/patch-PyObject_DelItemString b/lang/python31/files/patch-PyObject_DelItemString
new file mode 100644
index 0000000..4f81f9e
--- /dev/null
+++ b/lang/python31/files/patch-PyObject_DelItemString
@@ -0,0 +1,56 @@
+Index: Include/abstract.h
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Include/abstract.h,v
+retrieving revision 2.42
+retrieving revision 2.43
+diff -u -r2.42 -r2.43
+--- Include/abstract.h 28 Nov 2001 16:20:07 -0000 2.42
++++ Include/abstract.h 5 Jan 2002 10:50:30 -0000 2.43
+@@ -445,6 +445,14 @@
+ statement: o[key]=v.
+ */
+
++ DL_IMPORT(int) PyObject_DelItemString(PyObject *o, char *key);
++
++ /*
++ Remove the mapping for object, key, from the object *o.
++ Returns -1 on failure. This is equivalent to
++ the Python statement: del o[key].
++ */
++
+ DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key);
+
+ /*
+Index: Objects/abstract.c
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Objects/abstract.c,v
+retrieving revision 2.93
+retrieving revision 2.94
+diff -u -r2.93 -r2.94
+--- Objects/abstract.c 24 Nov 2001 18:24:47 -0000 2.93
++++ Objects/abstract.c 5 Jan 2002 10:50:30 -0000 2.94
+@@ -174,6 +174,24 @@
+ return -1;
+ }
+
++int
++PyObject_DelItemString(PyObject *o, char *key)
++{
++ PyObject *okey;
++ int ret;
++
++ if (o == NULL || key == NULL) {
++ null_error();
++ return -1;
++ }
++ okey = PyString_FromString(key);
++ if (okey == NULL)
++ return -1;
++ ret = PyObject_DelItem(o, okey);
++ Py_DECREF(okey);
++ return ret;
++}
++
+ int PyObject_AsCharBuffer(PyObject *obj,
+ const char **buffer,
+ int *buffer_len)
diff --git a/lang/python32/Makefile b/lang/python32/Makefile
index 87763fb..555e6a9 100644
--- a/lang/python32/Makefile
+++ b/lang/python32/Makefile
@@ -7,6 +7,7 @@
PORTNAME= python
PORTVERSION= 2.2
+PORTREVISION= 1
CATEGORIES= lang python
MASTER_SITES= http://www.python.org/ftp/python/${PORTVERSION}/ \
http://SunSITE.Informatik.RWTH-Aachen.DE/python/ftp/python/${PORTVERSION}/
diff --git a/lang/python32/files/patch-PyObject_DelItemString b/lang/python32/files/patch-PyObject_DelItemString
new file mode 100644
index 0000000..4f81f9e
--- /dev/null
+++ b/lang/python32/files/patch-PyObject_DelItemString
@@ -0,0 +1,56 @@
+Index: Include/abstract.h
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Include/abstract.h,v
+retrieving revision 2.42
+retrieving revision 2.43
+diff -u -r2.42 -r2.43
+--- Include/abstract.h 28 Nov 2001 16:20:07 -0000 2.42
++++ Include/abstract.h 5 Jan 2002 10:50:30 -0000 2.43
+@@ -445,6 +445,14 @@
+ statement: o[key]=v.
+ */
+
++ DL_IMPORT(int) PyObject_DelItemString(PyObject *o, char *key);
++
++ /*
++ Remove the mapping for object, key, from the object *o.
++ Returns -1 on failure. This is equivalent to
++ the Python statement: del o[key].
++ */
++
+ DL_IMPORT(int) PyObject_DelItem(PyObject *o, PyObject *key);
+
+ /*
+Index: Objects/abstract.c
+===================================================================
+RCS file: /home/python/cvs/python/dist/src/Objects/abstract.c,v
+retrieving revision 2.93
+retrieving revision 2.94
+diff -u -r2.93 -r2.94
+--- Objects/abstract.c 24 Nov 2001 18:24:47 -0000 2.93
++++ Objects/abstract.c 5 Jan 2002 10:50:30 -0000 2.94
+@@ -174,6 +174,24 @@
+ return -1;
+ }
+
++int
++PyObject_DelItemString(PyObject *o, char *key)
++{
++ PyObject *okey;
++ int ret;
++
++ if (o == NULL || key == NULL) {
++ null_error();
++ return -1;
++ }
++ okey = PyString_FromString(key);
++ if (okey == NULL)
++ return -1;
++ ret = PyObject_DelItem(o, okey);
++ Py_DECREF(okey);
++ return ret;
++}
++
+ int PyObject_AsCharBuffer(PyObject *obj,
+ const char **buffer,
+ int *buffer_len)
OpenPOWER on IntegriCloud