equal
deleted
inserted
replaced
705 copy->maxlines = self->maxlines; |
705 copy->maxlines = self->maxlines; |
706 copy->numlines = 0; |
706 copy->numlines = 0; |
707 copy->pydata = self->pydata; |
707 copy->pydata = self->pydata; |
708 Py_INCREF(self->pydata); |
708 Py_INCREF(self->pydata); |
709 for (i = 0; i < self->numlines; i++) { |
709 for (i = 0; i < self->numlines; i++) { |
710 PyObject *arg = PyString_FromString(self->lines[i].start); |
710 PyObject *arglist = NULL, *result = NULL; |
711 PyObject *arglist = PyTuple_Pack(1, arg); |
711 arglist = Py_BuildValue("(s)", self->lines[i].start); |
712 PyObject *result = PyObject_CallObject(matchfn, arglist); |
712 if (!arglist) { |
|
713 return NULL; |
|
714 } |
|
715 result = PyObject_CallObject(matchfn, arglist); |
713 Py_DECREF(arglist); |
716 Py_DECREF(arglist); |
714 Py_DECREF(arg); |
|
715 /* if the callback raised an exception, just let it |
717 /* if the callback raised an exception, just let it |
716 * through and give up */ |
718 * through and give up */ |
717 if (!result) { |
719 if (!result) { |
718 free(copy->lines); |
720 free(copy->lines); |
719 Py_DECREF(self->pydata); |
721 Py_DECREF(self->pydata); |