From: Lars Magne Ingebrigtsen Date: Sat, 3 Sep 2011 21:59:25 +0000 (+0200) Subject: Fix up xmlCleanupParser sequence. X-Git-Tag: emacs-pretest-24.0.90~104^2~155^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fcb901a77a0a3eaf21f0126466ae84fdc18fce2c;p=emacs.git Fix up xmlCleanupParser sequence. * xml.c (parse_region): Don't call xmlCleanupParser after parsing, since this reportedly can destroy thread storage. * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown. --- diff --git a/src/ChangeLog b/src/ChangeLog index 52ec796d6cf..de12d8f0314 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2011-09-03 Lars Magne Ingebrigtsen + + * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown. + + * xml.c (parse_region): Don't call xmlCleanupParser after parsing, + since this reportedly can destroy thread storage. + 2011-08-30 Chong Yidong * syntax.c (find_defun_start): Update all cache variables if diff --git a/src/emacs.c b/src/emacs.c index 7039f063dc2..f68c47ffed0 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2097,6 +2097,10 @@ shut_down_emacs (int sig, int no_x, Lisp_Object stuff) #ifdef HAVE_NS ns_term_shutdown (sig); #endif + +#ifdef HAVE_LIBXML2 + xmlCleanupParser (); +#endif } diff --git a/src/xml.c b/src/xml.c index 55352baae3a..8b485e73649 100644 --- a/src/xml.c +++ b/src/xml.c @@ -141,7 +141,6 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html Fcons (Qnil, Fnreverse (Fcons (r, result)))); xmlFreeDoc (doc); - xmlCleanupParser (); } return result;