diff options
Diffstat (limited to 'Modules/pcremodule.c')
-rw-r--r-- | Modules/pcremodule.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/Modules/pcremodule.c b/Modules/pcremodule.c index 6fb2d07..99c6758 100644 --- a/Modules/pcremodule.c +++ b/Modules/pcremodule.c @@ -60,8 +60,7 @@ staticforward PyTypeObject Pcre_Type; #define STRING 9 static PcreObject * -newPcreObject(arg) - PyObject *arg; +newPcreObject(PyObject *args) { PcreObject *self; self = PyObject_New(PcreObject, &Pcre_Type); @@ -75,8 +74,7 @@ newPcreObject(arg) /* Pcre methods */ static void -PyPcre_dealloc(self) - PcreObject *self; +PyPcre_dealloc(PcreObject *self) { if (self->regex) (pcre_free)(self->regex); if (self->regex_extra) (pcre_free)(self->regex_extra); @@ -85,9 +83,7 @@ PyPcre_dealloc(self) static PyObject * -PyPcre_exec(self, args) - PcreObject *self; - PyObject *args; +PyPcre_exec(PcreObject *self, PyObject *args) { char *string; int stringlen, pos = 0, options=0, endpos = -1, i, count; @@ -139,9 +135,7 @@ static PyMethodDef Pcre_methods[] = { }; static PyObject * -PyPcre_getattr(self, name) - PcreObject *self; - char *name; +PyPcre_getattr(PcreObject *self, char *name) { return Py_FindMethod(Pcre_methods, (PyObject *)self, name); } @@ -168,9 +162,7 @@ staticforward PyTypeObject Pcre_Type = { /* --------------------------------------------------------------------- */ static PyObject * -PyPcre_compile(self, args) - PyObject *self; /* Not used */ - PyObject *args; +PyPcre_compile(PyObject *self, PyObject *args) { PcreObject *rv; PyObject *dictionary; @@ -220,9 +212,8 @@ PyPcre_compile(self, args) } static PyObject * -PyPcre_expand_escape(pattern, pattern_len, indexptr, typeptr) - unsigned char *pattern; - int pattern_len, *indexptr, *typeptr; +PyPcre_expand_escape(unsigned char *pattern, int pattern_len, + int *indexptr, int *typeptr) { unsigned char c; int index = *indexptr; @@ -447,9 +438,7 @@ PyPcre_expand_escape(pattern, pattern_len, indexptr, typeptr) } static PyObject * -PyPcre_expand(self, args) - PyObject *self; - PyObject *args; +PyPcre_expand(PyObject *self, PyObject *args) { PyObject *results, *match_obj; PyObject *repl_obj, *newstring; @@ -623,10 +612,7 @@ static PyMethodDef pcre_methods[] = { */ static void -insint(d, name, value) - PyObject * d; - char * name; - int value; +insint(PyObject *d, char *name, int value) { PyObject *v = PyInt_FromLong((long) value); if (v == NULL) { |