[Python-checkins] python/dist/src/Modules pyexpat.c,2.86,2.87
fdrake at users.sourceforge.net
fdrake at users.sourceforge.net
Fri Aug 13 05:13:00 CEST 2004
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv535/Modules
Modified Files:
pyexpat.c
Log Message:
make exception propogation more efficient; this avoids having Expat parse
the remaining data in the buffer (which it had done happily without reporting
any results)
this depends on a new feature in Expat added in 1.95.8
Index: pyexpat.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/pyexpat.c,v
retrieving revision 2.86
retrieving revision 2.87
diff -C2 -d -r2.86 -r2.87
*** pyexpat.c 4 Aug 2004 22:28:16 -0000 2.86
--- pyexpat.c 13 Aug 2004 03:12:57 -0000 2.87
***************
*** 358,362 ****
static PyObject*
! call_with_frame(PyCodeObject *c, PyObject* func, PyObject* args)
{
PyThreadState *tstate = PyThreadState_GET();
--- 358,363 ----
static PyObject*
! call_with_frame(PyCodeObject *c, PyObject* func, PyObject* args,
! xmlparseobject *self)
{
PyThreadState *tstate = PyThreadState_GET();
***************
*** 380,383 ****
--- 381,385 ----
if (tstate->curexc_traceback == NULL)
PyTraceBack_Here(f);
+ XML_StopParser(self->itself, XML_FALSE);
#ifdef FIX_TRACE
if (trace_frame_exc(tstate, f) < 0) {
***************
*** 454,458 ****
self->in_callback = 1;
temp = call_with_frame(getcode(CharacterData, "CharacterData", __LINE__),
! self->handlers[CharacterData], args);
/* temp is an owned reference again, or NULL */
self->in_callback = 0;
--- 456,460 ----
self->in_callback = 1;
temp = call_with_frame(getcode(CharacterData, "CharacterData", __LINE__),
! self->handlers[CharacterData], args, self);
/* temp is an owned reference again, or NULL */
self->in_callback = 0;
***************
*** 575,579 ****
self->in_callback = 1;
rv = call_with_frame(getcode(StartElement, "StartElement", __LINE__),
! self->handlers[StartElement], args);
self->in_callback = 0;
Py_DECREF(args);
--- 577,581 ----
self->in_callback = 1;
rv = call_with_frame(getcode(StartElement, "StartElement", __LINE__),
! self->handlers[StartElement], args, self);
self->in_callback = 0;
Py_DECREF(args);
***************
*** 602,606 ****
self->in_callback = 1; \
rv = call_with_frame(getcode(NAME,#NAME,__LINE__), \
! self->handlers[NAME], args); \
self->in_callback = 0; \
Py_DECREF(args); \
--- 604,608 ----
self->in_callback = 1; \
rv = call_with_frame(getcode(NAME,#NAME,__LINE__), \
! self->handlers[NAME], args, self); \
self->in_callback = 0; \
Py_DECREF(args); \
***************
*** 759,763 ****
self->in_callback = 1;
rv = call_with_frame(getcode(ElementDecl, "ElementDecl", __LINE__),
! self->handlers[ElementDecl], args);
self->in_callback = 0;
if (rv == NULL) {
--- 761,765 ----
self->in_callback = 1;
rv = call_with_frame(getcode(ElementDecl, "ElementDecl", __LINE__),
! self->handlers[ElementDecl], args, self);
self->in_callback = 0;
if (rv == NULL) {
More information about the Python-checkins
mailing list