[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/ZopeSplitter/src - ZopeSplitter.c:1.5.10.4
Andreas Jung
andreas@zope.com
Tue, 8 Jan 2002 14:43:40 -0500
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/ZopeSplitter/src
In directory cvs.zope.org:/tmp/cvs-serv25147/src
Modified Files:
Tag: ajung-textindexng-branch
ZopeSplitter.c
Log Message:
added some additional checks
=== Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/ZopeSplitter/src/ZopeSplitter.c 1.5.10.3 => 1.5.10.4 ===
&doc,&synstop,&encoding,&single_char,&index_numbers,&max_len)) return NULL;
+
+ if (index_numbers<0 || index_numbers>1) {
+ PyErr_SetString(PyExc_ValueError,"indexnumbers must be 0 or 1");
+ return NULL;
+ }
+
+ if (single_char<0 || single_char>1) {
+ PyErr_SetString(PyExc_ValueError,"singlechar must be 0 or 1");
+ return NULL;
+ }
+
+ if (max_len<1 || max_len>128) {
+ PyErr_SetString(PyExc_ValueError,"maxlen must be between 1 and 128");
+ return NULL;
+ }
+
UNLESS(self = PyObject_NEW(Splitter, &SplitterType)) return NULL;
if(synstop) {