diff options
author | Fred Drake <fdrake@acm.org> | 2002-06-28 22:29:01 +0000 |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-06-28 22:29:01 +0000 |
commit | 032b40c5c88ffe7ba26d6eeb133c8f5c9e3da70c (patch) | |
tree | dff2c63d46cb8350f57c034693f16afcfd2511c4 /Python/pythonrun.c | |
parent | 5ac19b53b57a788e69ca04cd42ad6ee7b633b3ec (diff) | |
download | cpython-032b40c5c88ffe7ba26d6eeb133c8f5c9e3da70c.tar.gz |
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 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions