[Lxml-checkins] r53784 - in lxml/trunk: . src/lxml
scoder at codespeak.net
scoder at codespeak.net
Tue Apr 15 15:29:03 CEST 2008
Author: scoder
Date: Tue Apr 15 15:29:02 2008
New Revision: 53784
Modified:
lxml/trunk/ (props changed)
lxml/trunk/src/lxml/xmlerror.pxi
lxml/trunk/src/lxml/xslt.pxi
Log:
r3968 at delle: sbehnel | 2008-04-15 15:26:33 +0200
some cleanup, small fix: line count starts at 1
Modified: lxml/trunk/src/lxml/xmlerror.pxi
==============================================================================
--- lxml/trunk/src/lxml/xmlerror.pxi (original)
+++ lxml/trunk/src/lxml/xmlerror.pxi Tue Apr 15 15:29:02 2008
@@ -461,7 +461,7 @@
if cstd.strstr(msg, 'line %d'):
c_error.line = cstd.va_int(args)
else:
- c_error.line = -1
+ c_error.line = 0
if cstd.strstr(msg, 'element %s'):
c_element = cstd.va_charptr(args)
else:
Modified: lxml/trunk/src/lxml/xslt.pxi
==============================================================================
--- lxml/trunk/src/lxml/xslt.pxi (original)
+++ lxml/trunk/src/lxml/xslt.pxi Tue Apr 15 15:29:02 2008
@@ -496,22 +496,24 @@
if resolver_context is not None and resolver_context._has_raised():
if c_result is not NULL:
tree.xmlFreeDoc(c_result)
+ c_result = NULL
resolver_context._raise_if_stored()
if context._exc._has_raised():
if c_result is not NULL:
tree.xmlFreeDoc(c_result)
+ c_result = NULL
context._exc._raise_if_stored()
if c_result is NULL:
# last error seems to be the most accurate here
error = self._error_log.last_error
if error is not None and error.message:
- if error.line >= 0:
+ if error.line > 0:
message = "%s, line %d" % (error.message, error.line)
else:
message = error.message
- elif error is not None and error.line >= 0:
+ elif error is not None and error.line > 0:
message = "Error applying stylesheet, line %d" % error.line
else:
message = "Error applying stylesheet"
More information about the lxml-checkins
mailing list