Commit a9bb7310 authored by Andreas Jung's avatar Andreas Jung

Splitter fixes to work under MacOSX

Backported from Zope-2_4-branch
parent d4cb5f76
*shared* *shared*
Splitter src/Splitter.c ISO_8859_1_Splitter src/ISO_8859_1_Splitter.c
from Splitter import Splitter from ISO_8859_1_Splitter import ISO_8859_1_Splitter as Splitter
...@@ -523,8 +523,8 @@ err: ...@@ -523,8 +523,8 @@ err:
} }
static struct PyMethodDef Splitter_module_methods[] = { static struct PyMethodDef Splitter_module_methods[] = {
{ "Splitter", (PyCFunction)get_Splitter, METH_VARARGS, { "ISO_8859_1_Splitter", (PyCFunction)get_Splitter, METH_VARARGS,
"Splitter(doc[,synstop]) -- Return a word splitter" }, "ISO_8859_1_Splitter(doc[,synstop]) -- Return a word splitter" },
{ NULL, NULL } { NULL, NULL }
}; };
...@@ -533,19 +533,19 @@ static char Splitter_module_documentation[] = ...@@ -533,19 +533,19 @@ static char Splitter_module_documentation[] =
"\n" "\n"
"for use in an inverted index\n" "for use in an inverted index\n"
"\n" "\n"
"$Id: Splitter.c,v 1.4 2001/06/01 16:09:39 andreas Exp $\n" "$Id: ISO_8859_1_Splitter.c,v 1.2 2001/08/07 19:40:06 andreasjung Exp $\n"
; ;
void void
initSplitter(void) initISO_8859_1_Splitter(void)
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.4 $"; char *rev="$Revision: 1.2 $";
/* Create the module and add the functions */ /* Create the module and add the functions */
initSplitterTrtabs(); initSplitterTrtabs();
m = Py_InitModule4("Splitter", Splitter_module_methods, m = Py_InitModule4("ISO_8859_1_Splitter", Splitter_module_methods,
Splitter_module_documentation, Splitter_module_documentation,
(PyObject*)NULL,PYTHON_API_VERSION); (PyObject*)NULL,PYTHON_API_VERSION);
......
*shared* *shared*
Splitter src/Splitter.c ZopeSplitter src/ZopeSplitter.c
from Splitter import Splitter from ZopeSplitter import ZopeSplitter as Splitter
class ZopeSplitter:
meta_type="Splitter"
description="Zope Default Splitter"
Splitter = Splitter
def __init__(self):
print "__init__"
def a(self):
"""a"""
print "initialize",self.meta_type
pass
def b(self):
"""b"""
print "binitialize",self.meta_type
pass
...@@ -468,8 +468,8 @@ err: ...@@ -468,8 +468,8 @@ err:
} }
static struct PyMethodDef Splitter_module_methods[] = { static struct PyMethodDef Splitter_module_methods[] = {
{ "Splitter", (PyCFunction)get_Splitter, METH_VARARGS, { "ZopeSplitter", (PyCFunction)get_Splitter, METH_VARARGS,
"Splitter(doc[,synstop]) -- Return a word splitter" }, "ZopeSplitter(doc[,synstop]) -- Return a word splitter" },
{ NULL, NULL } { NULL, NULL }
}; };
...@@ -478,18 +478,18 @@ static char Splitter_module_documentation[] = ...@@ -478,18 +478,18 @@ static char Splitter_module_documentation[] =
"\n" "\n"
"for use in an inverted index\n" "for use in an inverted index\n"
"\n" "\n"
"$Id: Splitter.c,v 1.2 2001/05/30 15:57:35 andreas Exp $\n" "$Id: ZopeSplitter.c,v 1.2 2001/08/07 19:40:06 andreasjung Exp $\n"
; ;
void void
initSplitter(void) initZopeSplitter(void)
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.2 $"; char *rev="$Revision: 1.2 $";
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("Splitter", Splitter_module_methods, m = Py_InitModule4("ZopeSplitter", Splitter_module_methods,
Splitter_module_documentation, Splitter_module_documentation,
(PyObject*)NULL,PYTHON_API_VERSION); (PyObject*)NULL,PYTHON_API_VERSION);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment