libxml-ruby-1.1.3 for libxml2-2.9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/vendor/gems/libxml-ruby-1.1.3/ext/libxml/ruby_xml_node.c b/vendor/gems/libxml-ruby-1.1.3/ext/libxml/ruby_xml_node.c | |
index ed058d2..7c48017 100644 | |
--- a/vendor/gems/libxml-ruby-1.1.3/ext/libxml/ruby_xml_node.c | |
+++ b/vendor/gems/libxml-ruby-1.1.3/ext/libxml/ruby_xml_node.c | |
@@ -571,10 +571,17 @@ static VALUE rxml_node_to_s(int argc, VALUE *argv, VALUE self) | |
xmlNodeDumpOutput(output, xnode->doc, xnode, level, indent, xencoding); | |
xmlOutputBufferFlush(output); | |
+#ifdef LIBXML2_NEW_BUFFER | |
+ if (output->conv) | |
+ result = rxml_new_cstr((const char*) xmlBufContent(output->conv), xencoding); | |
+ else | |
+ result = rxml_new_cstr((const char*) xmlBufContent(output->buffer), xencoding); | |
+#else | |
if (output->conv) | |
result = rb_str_new2((const char*) output->conv->content); | |
else | |
result = rb_str_new2((const char*) output->buffer->content); | |
+#endif | |
xmlOutputBufferClose(output); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment