[Zope-dev] small patch to cDocumentTemplate.c to ease debugging
Andreas Kostyrka
andreas@kostyrka.priv.at
23 Sep 2002 20:48:07 +0200
Hi!
As pDocumentTemplate.py is out-of-order at the moment, here is a small
patch to make cDocumentTemplate show more attributes (to help
debugging).
Andreas
Index: lib/python/DocumentTemplate/cDocumentTemplate.c
===================================================================
RCS file:
/cvs-repository/Zope/lib/python/DocumentTemplate/cDocumentTemplate.c,v
retrieving revision 1.48
diff -u -u -r1.48 cDocumentTemplate.c
--- lib/python/DocumentTemplate/cDocumentTemplate.c 5 Aug 2002
20:51:14 -0000 1.48
+++ lib/python/DocumentTemplate/cDocumentTemplate.c 23 Sep 2002
18:41:55 -0000
@@ -447,6 +447,11 @@
{
if (strcmp(PyString_AsString(name),"level")==0)
return PyInt_FromLong(self->level);
+ if (strcmp(PyString_AsString(name),"dicts")==0)
+ {
+ Py_INCREF(self->data);
+ return self->data;
+ }
}
if (self->dict)