Subject: | [PATCH] Make XML-LibXML 1.58 compile with old GCC |
Hello,
Attached is a small patch to make XML-LibXML 1.58 work under old GCC:
# gcc --version
egcs-2.91.66
Regards,
--
Close the world, txEn eht nepO.
Subject: | XML-LibXML-1.58-old-gcc-fix.patch |
--- XML-LibXML-1.58-orig/perl-libxml-mm.c Wed Mar 31 21:32:08 2004
+++ XML-LibXML-1.58/perl-libxml-mm.c Fri Apr 7 10:26:52 2006
@@ -959,13 +959,14 @@
if ( refnode != NULL ) {
xmlDocPtr real_doc = refnode->doc;
if ( real_doc != NULL && real_doc->encoding != NULL ) {
+ xmlChar * decoded;
xs_warn( " encode node !!" );
/* The following statement is to handle bad
values set by XML::LibXSLT */
if ( PmmNodeEncoding(real_doc) == XML_CHAR_ENCODING_NONE ) {
PmmNodeEncoding(real_doc) = XML_CHAR_ENCODING_UTF8;
}
- xmlChar * decoded = PmmFastDecodeString( PmmNodeEncoding(real_doc) ,
+ decoded = PmmFastDecodeString( PmmNodeEncoding(real_doc) ,
(const xmlChar *)string,
(const xmlChar*)real_doc->encoding);
xs_warn( "push decoded string into SV" );