Commits

Anonymous committed 09295b4

Added NoGCDocument for return of getOwnerDocument
Added type casts for fussy compilers

  • Participants
  • Parent commits 081481e

Comments (0)

Files changed (3)

 @XML::LibXML::Text::ISA         = 'XML::LibXML::Node';
 @XML::LibXML::Comment::ISA      = 'XML::LibXML::Text';
 @XML::LibXML::CDATASection::ISA = 'XML::LibXML::Text';
+@XML::LibXML::NoGCDocment       = 'XML::LibXML::Document';
+
+sub XML::LibXML::NoGCDocument::DESTROY () { }
 
 1;
 __END__
 getOwnerDocument( elem )
         xmlNodePtr elem
     PREINIT:
-        const char * CLASS = "XML::LibXML::Document";
+        const char * CLASS = "XML::LibXML::NoGCDocument";
     CODE:
         RETVAL = elem->doc;
     OUTPUT:
         if( node != NULL ) {
             name =  node->name;
         }
-        RETVAL = newSVpvn( name, xmlStrlen( name ) );
+        RETVAL = newSVpvn( (char *)name, xmlStrlen( name ) );
     OUTPUT:
         RETVAL
 
             content = node->content;
         }
         if ( content != 0 ){
-            RETVAL = newSVpvn( content, xmlStrlen( content ) );
+            RETVAL = newSVpvn( (char *)content, xmlStrlen( content ) );
         }
         else {
             RETVAL = &PL_sv_undef;
                 element = sv_newmortal(); 
 
                 cls = domNodeTypeName( tnode );
-                XPUSHs( sv_setref_pv( element, cls, (void*)tnode ) );
+                XPUSHs( sv_setref_pv( element, (char *)cls, (void*)tnode ) );
             }
 
             xmlXPathFreeNodeSet( nodelist );
         while ( cld ) {	
             element = sv_newmortal();
             cls = domNodeTypeName( cld );
-            XPUSHs( sv_setref_pv( element, cls, (void*)cld ) );
+            XPUSHs( sv_setref_pv( element, (char *)cls, (void*)cld ) );
             cld = cld->next;
             len++;
         }
                 element = sv_newmortal(); 
 
                 cls = domNodeTypeName( tnode ); 
-                XPUSHs( sv_setref_pv( element, cls, (void*)tnode ) );
+                XPUSHs( sv_setref_pv( element, (char *)cls, (void*)tnode ) );
             }
 
             xmlXPathFreeNodeSet( nodelist );
 # char* having the name of the package for the blessing.
 O_OBJECT
         sv_setref_pv( $arg, (char *)CLASS, (void*)$var );
+