diff options
author | William M. Brack <wbrack@src.gnome.org> | 2007-11-12 21:53:00 +0000 |
---|---|---|
committer | William M. Brack <wbrack@src.gnome.org> | 2007-11-12 21:53:00 +0000 |
commit | ee016c46d1f6b949703209305362fc1119f569b9 (patch) | |
tree | 32c9ba0c179a544aab4389ad4a2e03bd58b2efdc | |
parent | f9876fd931a9543251456b5dbd464546816156a1 (diff) | |
download | libxslt-ee016c46d1f6b949703209305362fc1119f569b9.tar.gz libxslt-ee016c46d1f6b949703209305362fc1119f569b9.tar.bz2 libxslt-ee016c46d1f6b949703209305362fc1119f569b9.zip |
Added code to mark the results of str:tokenize and str:split as "function
* libexslt/strings.c: Added code to mark the results of
str:tokenize and str:split as "function result" to avoid
garbage-collecting them during global variable initialisation.
Should fix bug #495995.
svn path=/trunk/; revision=1448
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | libexslt/strings.c | 10 |
2 files changed, 17 insertions, 0 deletions
@@ -1,3 +1,10 @@ +Mon Nov 12 13:53:58 PDT 2007 William Brack <wbrack@mmm.com.hk> + + * libexslt/strings.c: Added code to mark the results of + str:tokenize and str:split as "function result" to avoid + garbage-collecting them during global variable initialisation. + Should fix bug #495995. + Wed Oct 24 17:41:08 PDT 2007 William Brack <wbrack@mmm.com.hk> * python/libxslt.c: changed iterator argument for Py_Dict_Next diff --git a/libexslt/strings.c b/libexslt/strings.c index af7aa88a..e4eb3eab 100644 --- a/libexslt/strings.c +++ b/libexslt/strings.c @@ -111,6 +111,11 @@ exsltStrTokenizeFunction(xmlXPathParserContextPtr ctxt, int nargs) xmlAddChild((xmlNodePtr) container, node); xmlXPathNodeSetAddUnique(ret->nodesetval, node); } + /* + * Mark it as a function result in order to avoid garbage + * collecting of tree fragments + */ + xsltExtensionInstructionResultRegister(tctxt, ret); } } @@ -217,6 +222,11 @@ exsltStrSplitFunction(xmlXPathParserContextPtr ctxt, int nargs) { xmlAddChild((xmlNodePtr) container, node); xmlXPathNodeSetAddUnique(ret->nodesetval, node); } + /* + * Mark it as a function result in order to avoid garbage + * collecting of tree fragments + */ + xsltExtensionInstructionResultRegister(tctxt, ret); } } |