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

Andreas Jung andreas@zope.com
Mon, 7 Jan 2002 19:01:20 -0500


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

Modified Files:
      Tag: ajung-textindexng-branch
	UnicodeSplitter.c 
Log Message:
added split() function. 


=== Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/UnicodeSplitter/src/UnicodeSplitter.c 1.12 => 1.12.10.1 ===
 }
 
+static PyObject * 
+Splitter_split(Splitter *self) {
+
+    Py_INCREF(self->list);
+
+    return self->list;
+}
+
 
 static PyObject *
 Splitter_indexes(Splitter *self, PyObject *args)
@@ -133,6 +141,8 @@
 
 static struct PyMethodDef Splitter_methods[] =
     {
+        { "split", (PyCFunction) Splitter_split, 0,
+          "split() -- Split string in one run" },
         { "indexes", (PyCFunction)Splitter_indexes, METH_VARARGS,
           "indexes(word) -- Return a list of the indexes of word in the sequence",
         },
@@ -344,6 +354,7 @@
 
 static struct PyMethodDef Splitter_module_methods[] =
     {
+
         { "pos", (PyCFunction) Splitter_pos, 0,
           "pos(index) -- Return the starting and ending position of a token" },
         { "indexes", (PyCFunction) Splitter_indexes, METH_VARARGS,