diff options
author | Peter Schneider-Kamp <nowonder@nowonder.de> | 2000-07-10 13:12:27 (GMT) |
---|---|---|
committer | Peter Schneider-Kamp <nowonder@nowonder.de> | 2000-07-10 13:12:27 (GMT) |
commit | 39e0e5a180eb6c64a03806c18838d0083cc9f6f7 (patch) | |
tree | e868e53f968d3ae80024c59d481d8ff82105778b /Modules/pcremodule.c | |
parent | 7d0c71ac8c56de9d8547a37c3e6bbce4f8e943d3 (diff) | |
download | cpython-39e0e5a180eb6c64a03806c18838d0083cc9f6f7.zip cpython-39e0e5a180eb6c64a03806c18838d0083cc9f6f7.tar.gz cpython-39e0e5a180eb6c64a03806c18838d0083cc9f6f7.tar.bz2 |
ANSI-fication
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) { |