[Zope3-checkins] CVS: Zope3/src/zope/proxy - proxy.c:1.3
Fred L. Drake, Jr.
fred@zope.com
Tue, 1 Apr 2003 11:32:52 -0500
Update of /cvs-repository/Zope3/src/zope/proxy
In directory cvs.zope.org:/tmp/cvs-serv9992
Modified Files:
proxy.c
Log Message:
Support tp_iternext directly to allow proxies to be returned by
__iter__().
=== Zope3/src/zope/proxy/proxy.c 1.2 => 1.3 ===
--- Zope3/src/zope/proxy/proxy.c:1.2 Wed Dec 25 09:15:16 2002
+++ Zope3/src/zope/proxy/proxy.c Tue Apr 1 11:32:52 2003
@@ -106,6 +106,12 @@
return PyObject_GetIter(Proxy_GET_OBJECT(self));
}
+static PyObject *
+wrap_iternext(PyObject *self)
+{
+ return PyIter_Next(Proxy_GET_OBJECT(self));
+}
+
static void
wrap_dealloc(PyObject *self)
{
@@ -626,7 +632,7 @@
wrap_richcompare, /* tp_richcompare */
0, /* tp_weaklistoffset */
wrap_iter, /* tp_iter */
- 0, /* tp_iternext */
+ wrap_iternext, /* tp_iternext */
wrap_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */