1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-06-13 19:21:37 +03:00

fixed bug #102181 by applying the suggested change and fixing the

* python/libxml.py python/libxml.c python/libxml2-python-api.xml:
  fixed bug #102181 by applying the suggested change and fixing
  the generation/registration problem.
Daniel
This commit is contained in:
Daniel Veillard
2003-01-10 13:14:40 +00:00
parent e55e8e4833
commit 3e20a29213
5 changed files with 28 additions and 8 deletions

View File

@ -462,6 +462,26 @@ PARSER_VALIDATE=3
PARSER_SUBST_ENTITIES=4
#
# Everything below this point is automatically generated
# register the libxml2 error handler
#
def registerErrorHandler(f, ctx):
"""Register a Python written function to for error reporting.
The function is called back as f(ctx, error). """
import sys
if not sys.modules.has_key('libxslt'):
# normal behaviour when libxslt is not imported
ret = libxml2mod.xmlRegisterErrorHandler(f,ctx)
else:
# when libxslt is already imported, one must
# use libxst's error handler instead
import libxslt
ret = libxslt.registerErrorHandler(f,ctx)
return ret
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
#
# Everything before this line comes from libxml.py
# Everything after this line is automatically generated
#
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING