equal
deleted
inserted
replaced
723 goto nomem; |
723 goto nomem; |
724 } |
724 } |
725 copy->maxlines = self->maxlines; |
725 copy->maxlines = self->maxlines; |
726 copy->numlines = 0; |
726 copy->numlines = 0; |
727 copy->pydata = self->pydata; |
727 copy->pydata = self->pydata; |
728 Py_INCREF(self->pydata); |
728 Py_INCREF(copy->pydata); |
729 for (i = 0; i < self->numlines; i++) { |
729 for (i = 0; i < self->numlines; i++) { |
730 PyObject *arglist = NULL, *result = NULL; |
730 PyObject *arglist = NULL, *result = NULL; |
731 arglist = Py_BuildValue(PY23("(s)", "(y)"), |
731 arglist = Py_BuildValue(PY23("(s)", "(y)"), |
732 self->lines[i].start); |
732 self->lines[i].start); |
733 if (!arglist) { |
733 if (!arglist) { |
737 Py_DECREF(arglist); |
737 Py_DECREF(arglist); |
738 /* if the callback raised an exception, just let it |
738 /* if the callback raised an exception, just let it |
739 * through and give up */ |
739 * through and give up */ |
740 if (!result) { |
740 if (!result) { |
741 free(copy->lines); |
741 free(copy->lines); |
742 Py_DECREF(self->pydata); |
742 Py_DECREF(copy->pydata); |
743 return NULL; |
743 return NULL; |
744 } |
744 } |
745 if (PyObject_IsTrue(result)) { |
745 if (PyObject_IsTrue(result)) { |
746 assert(!(self->lines[i].from_malloc)); |
746 assert(!(self->lines[i].from_malloc)); |
747 copy->lines[copy->numlines++] = self->lines[i]; |
747 copy->lines[copy->numlines++] = self->lines[i]; |