1. Shlomi Fish
  2. perl-XML-LibXML

Commits

ph...@9ae0c189-cd1f-4510-a509-f4891f5cf20d  committed 0d6d028

Modified Files:
Tag: mm_fix
LibXML.xs
+ perl 5.00503 xs calls

perl-libxml-mm.c
more debug messages

LibXML.pm t/20extras.t
o whitespaces

  • Participants
  • Parent commits 66087c9
  • Branches mm_fix

Comments (0)

Files changed (2)

File LibXML.xs

View file
  • Ignore whitespace
         xmlDtdPtr intSubset = NULL;
     CODE:
         real_dom = (xmlDocPtr)PmmNODE(SvPROXYNODE(self));
-        internalFlag = get_sv("XML::LibXML::setTagCompression", 0);
+        internalFlag = perl_get_sv("XML::LibXML::setTagCompression", 0);
         if( internalFlag ) {
             xmlSaveNoEmptyTags = SvTRUE(internalFlag);
         }
 
-        internalFlag = get_sv("XML::LibXML::skipDTD", 0);
+        internalFlag = perl_get_sv("XML::LibXML::skipDTD", 0);
         if ( internalFlag && SvTRUE(internalFlag) ) {
             intSubset = xmlGetIntSubset( real_dom );
             if ( intSubset )
         xmlDtdPtr intSubset = NULL;
         xmlDocPtr doc = (xmlDocPtr)PmmSvNode( self );
     CODE:
-        internalFlag = get_sv("XML::LibXML::setTagCompression", 0);
+        internalFlag = perl_get_sv("XML::LibXML::setTagCompression", 0);
         if( internalFlag ) {
             xmlSaveNoEmptyTags = SvTRUE(internalFlag);
         }
 
-        internalFlag = get_sv("XML::LibXML::skipDTD", 0);
+        internalFlag = perl_get_sv("XML::LibXML::skipDTD", 0);
         if ( internalFlag && SvTRUE(internalFlag) ) {
             intSubset = xmlGetIntSubset( doc );
             if ( intSubset )
         SV* internalFlag = NULL;
         int oldTagFlag = xmlSaveNoEmptyTags;
     CODE:
-        internalFlag = get_sv("XML::LibXML::setTagCompression", 0);
+        internalFlag = perl_get_sv("XML::LibXML::setTagCompression", 0);
         if( internalFlag ) {
             xmlSaveNoEmptyTags = SvTRUE(internalFlag);
         }
             }   
             else {
                 croak( "can't create a new namespace on an attribute!" );
+                xmlFree(name);
+                xmlFree(value);
                 XSRETURN_UNDEF;
             }
         }
         SV* internalFlag = NULL;
         int oldTagFlag = xmlSaveNoEmptyTags;
     CODE:
-        internalFlag = get_sv("XML::LibXML::setTagCompression", 0);
+        internalFlag = perl_get_sv("XML::LibXML::setTagCompression", 0);
 
         if ( internalFlag ) {
             xmlSaveNoEmptyTags = SvTRUE(internalFlag);

File perl-libxml-mm.c

View file
  • Ignore whitespace
         break;
     case XML_ATTRIBUTE_NODE:
         xs_warn("XML_ATTRIBUTE_NODE\n");
-        if ( node->parent == NULL ) 
+        if ( node->parent == NULL ) {
+            xs_warn( "free node\n");
+            node->ns = NULL;
             xmlFreeProp( (xmlAttrPtr) node );
+        }
         break;
     case XML_DTD_NODE:
         if ( node->doc ) {