diff options
author | Fred Drake <fdrake@acm.org> | 2002-06-28 22:29:01 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-06-28 22:29:01 (GMT) |
commit | 71b63ff3423001e385e60cae4222ba7327d873f4 (patch) | |
tree | 79845bb07cf3b278346f51321b8616d0b9f3e707 /Modules/parsermodule.c | |
parent | c9051640f807560b9c8d915f681feedb71083830 (diff) | |
download | cpython-71b63ff3423001e385e60cae4222ba7327d873f4.zip cpython-71b63ff3423001e385e60cae4222ba7327d873f4.tar.gz cpython-71b63ff3423001e385e60cae4222ba7327d873f4.tar.bz2 |
pyexpat code cleanup and minor refactorings:
The handlers array on each parser now has the invariant that None will
never be set as a handler; it will always be NULL or a Python-level
value passed in for the specific handler.
have_handler(): Return true if there is a Python handler for a
particular event.
get_handler_name(): Return a string object giving the name of a
particular handler. This caches the string object so it doesn't
need to be created more than once.
get_parse_result(): Helper to allow the Parse() and ParseFile()
methods to share the same logic for determining the return value
or exception state.
PyUnknownEncodingHandler(), PyModule_AddIntConstant():
Made these helpers static. (The later is only defined for older
versions of Python.)
pyxml_UpdatePairedHandlers(), pyxml_SetStartElementHandler(),
pyxml_SetEndElementHandler(), pyxml_SetStartNamespaceDeclHandler(),
pyxml_SetEndNamespaceDeclHandler(), pyxml_SetStartCdataSection(),
pyxml_SetEndCdataSection(), pyxml_SetStartDoctypeDeclHandler(),
pyxml_SetEndDoctypeDeclHandler():
Removed. These are no longer needed with Expat 1.95.x.
handler_info:
Use the setter functions provided by Expat 1.95.x instead of the
pyxml_Set*Handler() functions which have been removed.
Minor code formatting changes for consistency.
Trailing whitespace removed.
Diffstat (limited to 'Modules/parsermodule.c')
0 files changed, 0 insertions, 0 deletions