- fixed split behaviour on empty matches

- fixed compiler problems when using locale/unicode flags

- fixed group/octal code parsing in sub/subn templates
This commit is contained in:
Fredrik Lundh 2000-06-30 00:27:46 +00:00
parent 5d6ae76c09
commit 01016fe972
4 changed files with 55 additions and 42 deletions

View file

@ -1534,6 +1534,9 @@ pattern_getattr(PatternObject* self, char* name)
if (!strcmp(name, "flags"))
return Py_BuildValue("i", self->flags);
if (!strcmp(name, "groups"))
return Py_BuildValue("i", self->groups);
if (!strcmp(name, "groupindex") && self->groupindex) {
Py_INCREF(self->groupindex);
return self->groupindex;
@ -1939,9 +1942,6 @@ scanner_getattr(ScannerObject* self, char* name)
return self->pattern;
}
if (!strcmp(name, "groups"))
return Py_BuildValue("i", ((PatternObject*) self->pattern)->groups);
PyErr_SetString(PyExc_AttributeError, name);
return NULL;
}