[ expat-Bugs-1109116 ] Optimize implementation of XML_ParserReset
"SourceForge.net" <[email protected]> Tue, 25 Jan 2005 07:20:59 -0800
| Newsgroups | gmane.text.xml.expat.bugs |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1109116, was opened at 2005-01-25 09:46 Message generated for change (Comment added) made by kwaclaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1109116&group_id=10127 Category: None Group: Feature Request Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Karl Waclawek (kwaclaw) Summary: Optimize implementation of XML_ParserReset Initial Comment: The current implementation of XML_ParserReset sets the user data pointer and the handlers to NULL. So, the user has to set these again. At a first glance, there is no need to do things this way. Instead, XML_ParserReset could reset the internal parser data only and leave user data and handlers untouched. So after this function has been called, the parser would be ready to start parsing a new document (just like stated in the documentation of this function). To completely reset the parser, the user would still be able to call XML_ParserFree and XML_ParserCreate. Stefan Letz. stefan.letz <at> de.ibm.com ---------------------------------------------------------------------- >Comment By: Karl Waclawek (kwaclaw) Date: 2005-01-25 10:20 Message: Logged In: YES user_id=290026 I have created a patch against current CVS (xmlparse.c). XML_ParseReset will not clear any of the settings caused by these API functions: - all call-back handler setters (XML_Set...Handler) - XML_SetUserData - XML_SetBase - XML_UseParserAshandlerArg - XML_SetExternalEntityRefHandlerArg Please try the patch and report any problems it may cause. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1109116&group_id=10127