[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/ZopeSplitter/src - ZopeSplitter.c:1.2.10.3

Andreas Jung andreas@zope.com
Wed, 3 Oct 2001 14:35:57 -0400


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/ZopeSplitter/src
In directory cvs.zope.org:/tmp/cvs-serv11208/Splitter/ZopeSplitter/src

Modified Files:
      Tag: ajung-unicode
	ZopeSplitter.c 
Log Message:
savepoint


=== Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/ZopeSplitter/src/ZopeSplitter.c 1.2.10.2 => 1.2.10.3 ===
 {
         PyObject *item=NULL;
+        if (i >= PyList_Size(self->list)) return NULL;
+
         ASSIGN(item,PyList_GetItem(self->list , i));
         Py_XINCREF(item);
 
+#ifdef DEBUG
+        printf("\n\tItem %d",i);
+        PyObject_Print(item,stdout,0);
+        fflush(stdout);
+#endif
         return item;
 }
 
@@ -179,6 +186,12 @@
 
         UNLESS(self = PyObject_NEW(Splitter, &SplitterType)) return NULL;
         UNLESS(PyArg_ParseTuple(args,"O|O",&doc,&synstop)) return NULL;
+
+#ifdef DEBUG
+        puts("got text");
+        PyObject_Print(doc,stdout,0);
+        fflush(stdout);
+#endif
 
         UNLESS(self->list = PyUnicode_Split(doc,NULL,-1)) goto err;
         UNLESS(self->text = doc) goto err;