diff options
author | Raphaël Hertzog <hertzog@debian.org> | 2015-08-25 21:55:54 +0200 |
---|---|---|
committer | Raphaël Hertzog <hertzog@debian.org> | 2015-08-25 21:55:54 +0200 |
commit | 7300193becde71a344c8ac0973dc290fa24d800d (patch) | |
tree | 6490c364e7764294c209e536d42f3d31d23ebc0d /encoding.c | |
parent | 3871a83a5f0aebd8c00879eab14fe901c93dbfcf (diff) | |
download | libxml2-7300193becde71a344c8ac0973dc290fa24d800d.tar.gz |
Imported Upstream version 2.9.1+dfsg1
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 18 |
1 files changed, 2 insertions, 16 deletions
@@ -2384,7 +2384,6 @@ xmlCharEncInFunc(xmlCharEncodingHandler * handler, xmlBufferPtr out, return (written? written : ret); } -#ifdef LIBXML_OUTPUT_ENABLED /** * xmlCharEncOutput: * @output: a parser output buffer @@ -2613,7 +2612,6 @@ retry: } return(ret); } -#endif /** * xmlCharEncOutFunc: @@ -2853,25 +2851,14 @@ int xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) { int ret = 0; int tofree = 0; - int i, handler_in_list = 0; - if (handler == NULL) return(-1); if (handler->name == NULL) return(-1); - if (handlers != NULL) { - for (i = 0;i < nbCharEncodingHandler; i++) { - if (handler == handlers[i]) { - handler_in_list = 1; - break; - } - } - } #ifdef LIBXML_ICONV_ENABLED /* * Iconv handlers can be used only once, free the whole block. * and the associated icon resources. */ - if ((handler_in_list == 0) && - ((handler->iconv_out != NULL) || (handler->iconv_in != NULL))) { + if ((handler->iconv_out != NULL) || (handler->iconv_in != NULL)) { tofree = 1; if (handler->iconv_out != NULL) { if (iconv_close(handler->iconv_out)) @@ -2886,8 +2873,7 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) { } #endif /* LIBXML_ICONV_ENABLED */ #ifdef LIBXML_ICU_ENABLED - if ((handler_in_list == 0) && - ((handler->uconv_out != NULL) || (handler->uconv_in != NULL))) { + if ((handler->uconv_out != NULL) || (handler->uconv_in != NULL)) { tofree = 1; if (handler->uconv_out != NULL) { closeIcuConverter(handler->uconv_out); |