Hello community, here is the log from the commit of package perl-XML-LibXML for openSUSE:Factory checked in at 2012-02-14 11:26:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-XML-LibXML (Old) and /work/SRC/openSUSE:Factory/.perl-XML-LibXML.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-XML-LibXML", Maintainer is "vci...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-XML-LibXML/perl-XML-LibXML.changes 2011-11-14 13:26:17.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-XML-LibXML.new/perl-XML-LibXML.changes 2012-02-14 11:26:09.000000000 +0100 @@ -1,0 +2,21 @@ +Mon Jan 9 02:35:57 UTC 2012 - vci...@suse.com + +- update to 1.90 + - Pull a commit from Aaron Crange to fix compilation bugs in Devel.xs: + - local variable declarations must be in the PREINIT section, + not `CODE`, at least for some compiler/OS combinations. + - Thanks, Aaron! + +------------------------------------------------------------------- +Mon Jan 2 13:02:47 UTC 2012 - vci...@suse.cz + +- update to 1.89 + - Apply a patch with spelling fixes by Kevin Lyda : + - https://rt.cpan.org/Public/Bug/Display.html?id=71403 + - Thanks to Kevin. + - Apply a pull request by ElDiablo with the implementation of + lib/XML/LibXML/Devel.pm . + - Adjust the Win32 Build Instructions in the README file. + - Thanks to Christopher J. Madsen. + +------------------------------------------------------------------- Old: ---- XML-LibXML-1.88.tar.gz New: ---- XML-LibXML-1.90.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-XML-LibXML.spec ++++++ --- /var/tmp/diff_new_pack.tNfkSX/_old 2012-02-14 11:26:11.000000000 +0100 +++ /var/tmp/diff_new_pack.tNfkSX/_new 2012-02-14 11:26:11.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-XML-LibXML # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,21 +16,20 @@ # - Name: perl-XML-LibXML -Version: 1.88 -Release: 1 -License: GPL-1.0+ or Artistic-1.0 +Version: 1.90 +Release: 0 %define cpan_name XML-LibXML Summary: Perl Binding for libxml2 -Url: http://search.cpan.org/dist/XML-LibXML/ +License: GPL-1.0+ or Artistic-1.0 Group: Development/Libraries/Perl +Url: http://search.cpan.org/dist/XML-LibXML/ Source: http://www.cpan.org/authors/id/S/SH/SHLOMIF/%{cpan_name}-%{version}.tar.gz BuildRequires: perl -BuildRequires: perl(XML::SAX) >= 0.11 BuildRequires: perl-macros BuildRequires: perl(ExtUtils::MakeMaker) >= 6.56 BuildRequires: perl(XML::NamespaceSupport) >= 1.07 +BuildRequires: perl(XML::SAX) >= 0.11 BuildRequires: pkgconfig(libxml-2.0) >= 2.6.16 Requires: perl(XML::NamespaceSupport) >= 1.07 Requires: perl(XML::SAX) >= 0.11 ++++++ XML-LibXML-1.88.tar.gz -> XML-LibXML-1.90.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/Changes new/XML-LibXML-1.90/Changes --- old/XML-LibXML-1.88/Changes 2011-09-21 11:54:41.000000000 +0200 +++ new/XML-LibXML-1.90/Changes 2012-01-08 19:58:34.000000000 +0100 @@ -1,5 +1,20 @@ Revision history for Perl extension XML::LibXML +1.90 Sun Jan 8 20:57:58 IST 2012 + - Pull a commit from Aaron Crange to fix compilation bugs in Devel.xs: + - local variable declarations must be in the PREINIT section, + not `CODE`, at least for some compiler/OS combinations. + - Thanks, Aaron! + +1.89 Sat Dec 24 09:46:26 IDT 2011 + - Apply a patch with spelling fixes by Kevin Lyda : + - https://rt.cpan.org/Public/Bug/Display.html?id=71403 + - Thanks to Kevin. + - Apply a pull request by ElDiablo with the implementation of + lib/XML/LibXML/Devel.pm . + - Adjust the Win32 Build Instructions in the README file. + - Thanks to Christopher J. Madsen. + 1.88 Wed Sep 21 12:54:33 IDT 2011 - Add libxml2 2.7.8 as tested and working fine for the Makefile.PL. (Thanks to H. Merijn Brand.). @@ -11,7 +26,8 @@ - https://rt.cpan.org/Ticket/Display.html?id=70878 - Thanks to zzg...@gmail.com . - Add scripts/bump-version-number.pl to modify the version number globally. - - Currently the version numbers of the modules under lib/ where 1.73. + - Up to then, the version numbers of the modules under lib/ had + been 1.73. 1.87 Sat Aug 27 14:05:37 IDT 2011 - Fix t/49callbacks_returning_undef.t to not read /etc/passed which may diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/Devel.xs new/XML-LibXML-1.90/Devel.xs --- old/XML-LibXML-1.88/Devel.xs 1970-01-01 01:00:00.000000000 +0100 +++ new/XML-LibXML-1.90/Devel.xs 2012-01-08 19:52:54.000000000 +0100 @@ -0,0 +1,128 @@ +/* $Id: Devel.xs 20 2011-10-11 02:05:01Z jo $ + * + * This is free software, you may use it and distribute it under the same terms as + * Perl itself. + * + * Copyright 2011 Joachim Zobel + * + * This module gives external access to the functions needed to create + * and use XML::LibXML::Nodes from C functions. These functions are made + * accessible from Perl to have cleaner dependencies. + * The idea is to pass xmlNode * pointers (as typemapped void *) to and + * from Perl and call the functions that turns them to and from + * XML::LibXML::Nodes there. + * + * Be aware that using this module gives you the ability to easily create + * segfaults and memory leaks. + */ + +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" + +#include "ppport.h" + +#include <stdlib.h> + +/* XML::LibXML stuff */ +#include <libxml/xmlmemory.h> +#include "perl-libxml-mm.h" + +#undef NDEBUG +#include <assert.h> + +static void * xmlMemMallocAtomic(size_t size) +{ + return xmlMallocAtomicLoc(size, "none", 0); +} + +static int debug_memory() +{ + return xmlGcMemSetup( xmlMemFree, + xmlMemMalloc, + xmlMemMallocAtomic, + xmlMemRealloc, + xmlMemStrdup); +} + +MODULE = XML::LibXML::Devel PACKAGE = XML::LibXML::Devel + +PROTOTYPES: DISABLE + +BOOT: + if (getenv("DEBUG_MEMORY")) { + debug_memory(); + } + + + +SV* +node_to_perl( n, o = NULL ) + void * n + void * o + PREINIT: + xmlNode *node = n; + xmlNode *owner = o; + CODE: + RETVAL = PmmNodeToSv(node , owner?owner->_private:NULL ); + OUTPUT: + RETVAL + +void * +node_from_perl( sv ) + SV *sv + PREINIT: + xmlNode *n = PmmSvNodeExt(sv, 0); + CODE: + RETVAL = n; + OUTPUT: + RETVAL + +void +refcnt_inc( n ) + void *n + PREINIT: + xmlNode *node = n; + CODE: + PmmREFCNT_inc(((ProxyNode *)(node->_private))); + +int +refcnt_dec( n ) + void *n + PREINIT: + xmlNode *node = n; + CODE: + RETVAL = PmmREFCNT_dec(((ProxyNode *)(node->_private))); + OUTPUT: + RETVAL + +int +refcnt( n ) + void *n + PREINIT: + xmlNode *node = n; + CODE: + RETVAL = PmmREFCNT(((ProxyNode *)(node->_private))); + OUTPUT: + RETVAL + +int +fix_owner( n, p ) + void * n + void * p + PREINIT: + xmlNode *node = n; + xmlNode *parent = p; + CODE: + RETVAL = PmmFixOwner(node->_private , parent->_private); + OUTPUT: + RETVAL + +int +mem_used() + CODE: + RETVAL = xmlMemUsed(); + OUTPUT: + RETVAL + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/LibXML.pm new/XML-LibXML-1.90/LibXML.pm --- old/XML-LibXML-1.88/LibXML.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/LibXML.pm 2012-01-08 19:56:33.000000000 +0100 @@ -27,7 +27,7 @@ use IO::Handle; # for FH reads called as methods BEGIN { -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE $ABI_VERSION = 2; require Exporter; require DynaLoader; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/LibXML.pod new/XML-LibXML-1.90/LibXML.pod --- old/XML-LibXML-1.88/LibXML.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/LibXML.pod 2012-01-08 19:57:10.000000000 +0100 @@ -505,7 +505,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/LibXML.xs new/XML-LibXML-1.90/LibXML.xs --- old/XML-LibXML-1.88/LibXML.xs 2011-08-25 10:39:28.000000000 +0200 +++ new/XML-LibXML-1.90/LibXML.xs 2011-10-17 17:56:27.000000000 +0200 @@ -1434,6 +1434,9 @@ PROTOTYPES: DISABLE BOOT: + /* Load Devel first, so debug_memory can + be called before any allocation. */ + boot_XML__LibXML__Devel(aTHX_ cv); LIBXML_TEST_VERSION xmlInitParser(); PmmSAXInitialize(aTHX); @@ -1445,6 +1448,7 @@ xmlInitializeCatalog(); /* use catalog data */ #endif + void _CLONE( class ) CODE: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/MANIFEST new/XML-LibXML-1.90/MANIFEST --- old/XML-LibXML-1.88/MANIFEST 2011-09-21 11:59:53.000000000 +0200 +++ new/XML-LibXML-1.90/MANIFEST 2012-01-08 20:00:13.000000000 +0100 @@ -1,6 +1,7 @@ Av_CharPtrPtr.c Av_CharPtrPtr.h Changes +Devel.xs debian/changelog debian/compat debian/control @@ -60,6 +61,7 @@ lib/XML/LibXML/Common.pod lib/XML/LibXML/DocumentFragment.pod lib/XML/LibXML/Document.pod +lib/XML/LibXML/Devel.pm lib/XML/LibXML/DOM.pod lib/XML/LibXML/Dtd.pod lib/XML/LibXML/Element.pod @@ -152,6 +154,7 @@ t/49callbacks_returning_undef.t t/49global_extent.t t/49_load_html.t +t/50devel.t t/60error_prev_chain.t t/60struct_error.t t/61error.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/META.json new/XML-LibXML-1.90/META.json --- old/XML-LibXML-1.88/META.json 2011-09-21 11:59:53.000000000 +0200 +++ new/XML-LibXML-1.90/META.json 2012-01-08 20:00:13.000000000 +0100 @@ -4,7 +4,7 @@ "Petr Pajas" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150", + "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.113640", "keywords" : [ "dom", "html", @@ -67,5 +67,5 @@ "url" : "https://bitbucket.org/shlomif/perl-xml-libxml" } }, - "version" : "1.88" + "version" : "1.90" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/META.yml new/XML-LibXML-1.90/META.yml --- old/XML-LibXML-1.88/META.yml 2011-09-21 11:59:53.000000000 +0200 +++ new/XML-LibXML-1.90/META.yml 2012-01-08 20:00:13.000000000 +0100 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: 0 dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150' +generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.113640' keywords: - dom - html @@ -45,4 +45,4 @@ resources: homepage: https://bitbucket.org/shlomif/perl-xml-libxml repository: https://bitbucket.org/shlomif/perl-xml-libxml -version: 1.88 +version: 1.90 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/README new/XML-LibXML-1.90/README --- old/XML-LibXML-1.88/README 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/README 2012-01-08 19:57:10.000000000 +0100 @@ -155,9 +155,9 @@ Combine all the bin, include, and lib directories under c:\Prog\LibXML. (You can use any directory you prefer; just adjust the instructions accordingly.) -Get the latest version of XML-LibXML from CPAN. Extract them. +Get the latest version of XML-LibXML from CPAN. Extract it. -Issue these commands in the XML-LibXML-Common-VERSION directory: +Issue these commands in the XML-LibXML-VERSION directory: > perl Makefile.PL INC=-Ic:\Prog\LibXML\include LIBS=-Lc:\Prog\LibXML\lib > nmake @@ -171,13 +171,6 @@ with other programs you may have installed that use other (possibly incompatible) versions of those DLLs. -Issue these commands in the XML-LibXML-VERSION directory: - -> perl Makefile.PL INC=-Ic:\Prog\LibXML\include LIBS=-Lc:\Prog\LibXML\lib -> nmake -> nmake test -> nmake install - Notes for Mac OS X ================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/docs/libxml.dbk new/XML-LibXML-1.90/docs/libxml.dbk --- old/XML-LibXML-1.88/docs/libxml.dbk 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/docs/libxml.dbk 2012-01-08 19:57:10.000000000 +0100 @@ -22,7 +22,7 @@ </authorgroup> - <edition>1.88</edition> + <edition>1.90</edition> <copyright> <year>2001-2007</year> <holder>AxKit.com Ltd</holder> @@ -208,8 +208,8 @@ (You can use any directory you prefer; just adjust the instructions accordingly.)</para> <para>Get the latest version of XML-LibXML from CPAN. - Extract them.</para> - <para>Issue these commands in the XML-LibXML-Common-VERSION directory:</para> + Extract it.</para> + <para>Issue these commands in the XML-LibXML-VERSION directory:</para> <programlisting> perl Makefile.PL INC=-Ic:\Prog\LibXML\include LIBS=-Lc:\Prog\LibXML\lib nmake copy c:\Prog\LibXML\bin\*.dll blib\arch\auto\XML\LibXML @@ -219,11 +219,6 @@ <para>By copying the libxml2 DLLs to the arch directory, you help avoid conflicts with other programs you may have installed that use other (possibly incompatible) versions of those DLLs.</para> - <para>Issue these commands in the XML-LibXML-VERSION directory:</para> - <programlisting> perl Makefile.PL INC=-Ic:\Prog\LibXML\include LIBS=-Lc:\Prog\LibXML\lib - nmake - nmake test - nmake install</programlisting> </sect2> <sect2> <title>Notes for Mac OS X</title> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Attr.pod new/XML-LibXML-1.90/lib/XML/LibXML/Attr.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Attr.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Attr.pod 2012-01-08 19:57:10.000000000 +0100 @@ -121,7 +121,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Boolean.pm new/XML-LibXML-1.90/lib/XML/LibXML/Boolean.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/Boolean.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Boolean.pm 2012-01-08 19:56:33.000000000 +0100 @@ -15,7 +15,7 @@ use vars qw ($VERSION); -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE use overload '""' => \&value, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/CDATASection.pod new/XML-LibXML-1.90/lib/XML/LibXML/CDATASection.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/CDATASection.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/CDATASection.pod 2012-01-08 19:57:10.000000000 +0100 @@ -45,7 +45,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Comment.pod new/XML-LibXML-1.90/lib/XML/LibXML/Comment.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Comment.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Comment.pod 2012-01-08 19:57:10.000000000 +0100 @@ -46,7 +46,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Common.pm new/XML-LibXML-1.90/lib/XML/LibXML/Common.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/Common.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Common.pm 2012-01-08 19:56:33.000000000 +0100 @@ -23,7 +23,7 @@ @ISA = qw(Exporter); -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE use XML::LibXML qw(:libxml); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Common.pod new/XML-LibXML-1.90/lib/XML/LibXML/Common.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Common.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Common.pod 2012-01-08 19:57:10.000000000 +0100 @@ -116,7 +116,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/DOM.pod new/XML-LibXML-1.90/lib/XML/LibXML/DOM.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/DOM.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/DOM.pod 2012-01-08 19:57:10.000000000 +0100 @@ -129,7 +129,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Devel.pm new/XML-LibXML-1.90/lib/XML/LibXML/Devel.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/Devel.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Devel.pm 2012-01-08 19:56:33.000000000 +0100 @@ -0,0 +1,211 @@ +# $Id: $ +# This is free software, you may use it and distribute it under the same terms as +# Perl itself. +# +# Copyright 2011 Joachim Zobel +# +package XML::LibXML::Devel; + +use strict; +use warnings; + +use XML::LibXML; + +use vars qw ($VERSION); +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE + +use 5.008_000; + +use base qw(Exporter); + +use vars qw( @EXPORT @EXPORT_OK %EXPORT_TAGS ); + +# This allows declaration use XML::LibXML::Devel ':all'; +# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK +# will save memory. +our %EXPORT_TAGS = ( 'all' => [ qw( + node_to_perl + node_from_perl + refcnt_inc + refcnt_dec + refcnt + fix_owner + mem_used +) ] ); + +our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); + +# Preloaded methods go here. + +1; +__END__ + +=head1 NAME + +XML::LibXML::Devel - makes functions from LibXML.xs available + +=head1 SYNOPSIS + + // C functions + xmlNode *return_node(); + void receive_node(xmlNode *); + + # XS Code + void * + xs_return_node + CODE: + RETVAL = return_node(); + OUTPUT: + RETVAL + + void + xs_receive_node + void *n + CODE: + receive_node(n); + + # Perl code + use XML::LibXML::Devel; + + sub return_node + { + my $raw_node = xs_return_node(); + my $node = XML::LibXML::Devel::node_to_perl($raw_node); + XML::LibXML::Devel::refcnt_inc($raw_node); + return $node; + } + + sub receive_node + { + my ($node) = @_; + my $raw_node = XML::LibXML::Devel::node_from_perl($node); + xs_receive_node($raw_node); + XML::LibXML::Devel::refcnt_inc($raw_node); + } + + +=head1 DESCRIPTION + +C<XML::LibXML::Devel> makes functions from LibXML.xs available that +are needed to wrap libxml2 nodes in and out of XML::LibXML::Nodes. +This gives cleaner dependencies than using LibXML.so directly. + +To XS a library that uses libxml2 nodes the first step is to +do this so that xmlNodePtr is passed as void *. These raw nodes +are then turned into libxml nodes by using this Devel functions. + +Be aware that this is currently rather experimental. The function +names may change if I XS more functions and introduce a reasonable +naming convention. + +Be also aware that this is a great tool to cause segfaults and +introduce memory leaks. + +=head1 FUNCTIONS + +=head2 NODE MANAGEMENT + +=over 1 + +=item node_to_perl + + node_to_perl($raw_node); + +Returns a LibXML::Node object. This has a proxy node with a reference +counter and an owner attached. The raw node will be deleted as soon +as the reference counter reaches zero. +If the C library is keeping a +pointer to the raw node, you need to call refcnt_inc immediately. +You also need to replace xmlFreeNode by a call to refcnt_dec. + +=item node_to_perl + + node_from_perl($node); + +Returns a raw node. This is a void * pointer and you can do nothing +but passing it to functions that treat it as an xmlNodePtr. The +raw node will be freed as soon as its reference counter reaches zero. +If the C library is keeping a +pointer to the raw node, you need to call refcnt_inc immediately. +You also need to replace xmlFreeNode by a call to refcnt_dec. + +=item refcnt_inc + + refcnt_inc($raw_node); + +Increments the raw nodes reference counter. The raw node must already +be known to perl to have a reference counter. + +=item refcnt_dec + + refcnt_dec($raw_node); + +Decrements the raw nodes reference counter and returns the value it +had before. if the counter becomes zero or less, +this method will free the proxy node holding the reference counter. +If the node is part of a +subtree, refcnt_dec will fix the reference counts and delete +the subtree if it is not required any more. + +=item refcnt + + refcnt($raw_node); + +Returns the value of the reference counter. + +=item fix_owner + + fix_owner($raw_node, $raw_parent); + +This functions fixes the reference counts for an entire subtree. +it is very important to fix an entire subtree after node operations +where the documents or the owner node may get changed. this method is +aware about nodes that already belong to a certain owner node. + +=back + +=head2 MEMORY DEBUGGING + +=over 1 + +=item $ENV{DEBUG_MEMORY} + + BEGIN {$ENV{DEBUG_MEMORY} = 1;}; + use XML::LibXML; + +This turns on libxml2 memory debugging. It must be set before +XML::LibXML is loaded. + + +=item mem_used + + mem_used(); + +Returns the number of bytes currently allocated. + +=back + +=head2 EXPORT + +None by default. + +=head1 SEE ALSO + +This was created to support the needs of Apache2::ModXml2. So this +can serve as an example. + +=head1 AUTHOR + +Joachim Zobel E<lt>jz-2...@heute-morgen.dee<gt> + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2011 by Joachim Zobel + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself, either Perl version 5.10.1 or, +at your option, any later version of Perl 5 you may have available. + + +=cut + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Document.pod new/XML-LibXML-1.90/lib/XML/LibXML/Document.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Document.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Document.pod 2012-01-08 19:57:10.000000000 +0100 @@ -683,7 +683,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/DocumentFragment.pod new/XML-LibXML-1.90/lib/XML/LibXML/DocumentFragment.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/DocumentFragment.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/DocumentFragment.pod 2012-01-08 19:57:10.000000000 +0100 @@ -27,7 +27,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Dtd.pod new/XML-LibXML-1.90/lib/XML/LibXML/Dtd.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Dtd.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Dtd.pod 2012-01-08 19:57:10.000000000 +0100 @@ -89,7 +89,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Element.pod new/XML-LibXML-1.90/lib/XML/LibXML/Element.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Element.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Element.pod 2012-01-08 19:57:10.000000000 +0100 @@ -371,7 +371,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/ErrNo.pm new/XML-LibXML-1.90/lib/XML/LibXML/ErrNo.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/ErrNo.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/ErrNo.pm 2012-01-08 19:56:33.000000000 +0100 @@ -13,7 +13,7 @@ use strict; use vars qw($VERSION); -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE use constant ERR_OK => 0; use constant ERR_INTERNAL_ERROR => 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/ErrNo.pod new/XML-LibXML-1.90/lib/XML/LibXML/ErrNo.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/ErrNo.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/ErrNo.pod 2012-01-08 19:57:10.000000000 +0100 @@ -14,7 +14,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Error.pm new/XML-LibXML-1.90/lib/XML/LibXML/Error.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/Error.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Error.pm 2012-01-08 19:56:33.000000000 +0100 @@ -29,7 +29,7 @@ fallback => 1; $WARNINGS = 0; # 0: supress, 1: report via warn, 2: report via die -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE use constant XML_ERR_NONE => 0; use constant XML_ERR_WARNING => 1; # A simple warning diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Error.pod new/XML-LibXML-1.90/lib/XML/LibXML/Error.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Error.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Error.pod 2012-01-08 19:57:10.000000000 +0100 @@ -244,7 +244,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/InputCallback.pod new/XML-LibXML-1.90/lib/XML/LibXML/InputCallback.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/InputCallback.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/InputCallback.pod 2012-01-08 19:57:10.000000000 +0100 @@ -280,7 +280,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Literal.pm new/XML-LibXML-1.90/lib/XML/LibXML/Literal.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/Literal.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Literal.pm 2012-01-08 19:56:33.000000000 +0100 @@ -13,7 +13,7 @@ use strict; use vars qw ($VERSION); -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE use overload '""' => \&value, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Namespace.pod new/XML-LibXML-1.90/lib/XML/LibXML/Namespace.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Namespace.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Namespace.pod 2012-01-08 19:57:10.000000000 +0100 @@ -130,7 +130,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Node.pod new/XML-LibXML-1.90/lib/XML/LibXML/Node.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Node.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Node.pod 2012-01-08 19:57:10.000000000 +0100 @@ -739,7 +739,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/NodeList.pm new/XML-LibXML-1.90/lib/XML/LibXML/NodeList.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/NodeList.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/NodeList.pm 2012-01-08 19:56:33.000000000 +0100 @@ -17,7 +17,7 @@ use XML::LibXML::Number; use vars qw($VERSION); -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE use overload '""' => \&to_literal, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Number.pm new/XML-LibXML-1.90/lib/XML/LibXML/Number.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/Number.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Number.pm 2012-01-08 19:56:33.000000000 +0100 @@ -13,7 +13,7 @@ use strict; use vars qw ($VERSION); -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE use overload '""' => \&value, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/PI.pod new/XML-LibXML-1.90/lib/XML/LibXML/PI.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/PI.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/PI.pod 2012-01-08 19:57:10.000000000 +0100 @@ -74,7 +74,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Parser.pod new/XML-LibXML-1.90/lib/XML/LibXML/Parser.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Parser.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Parser.pod 2012-01-08 19:57:10.000000000 +0100 @@ -969,7 +969,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Pattern.pod new/XML-LibXML-1.90/lib/XML/LibXML/Pattern.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Pattern.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Pattern.pod 2012-01-08 19:57:10.000000000 +0100 @@ -94,7 +94,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Reader.pm new/XML-LibXML-1.90/lib/XML/LibXML/Reader.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/Reader.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Reader.pm 2012-01-08 19:56:33.000000000 +0100 @@ -14,7 +14,7 @@ use warnings; use vars qw ($VERSION); -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE use 5.008_000; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Reader.pod new/XML-LibXML-1.90/lib/XML/LibXML/Reader.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Reader.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Reader.pod 2012-01-08 19:57:10.000000000 +0100 @@ -656,7 +656,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/RegExp.pod new/XML-LibXML-1.90/lib/XML/LibXML/RegExp.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/RegExp.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/RegExp.pod 2012-01-08 19:57:10.000000000 +0100 @@ -58,7 +58,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/RelaxNG.pod new/XML-LibXML-1.90/lib/XML/LibXML/RelaxNG.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/RelaxNG.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/RelaxNG.pod 2012-01-08 19:57:10.000000000 +0100 @@ -69,7 +69,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/SAX/Builder.pm new/XML-LibXML-1.90/lib/XML/LibXML/SAX/Builder.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/SAX/Builder.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/SAX/Builder.pm 2012-01-08 19:56:33.000000000 +0100 @@ -18,7 +18,7 @@ return $XML::LibXML::__threads_shared ? 0 : 1; } -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE sub new { my $class = shift; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/SAX/Builder.pod new/XML-LibXML-1.90/lib/XML/LibXML/SAX/Builder.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/SAX/Builder.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/SAX/Builder.pod 2012-01-08 19:57:10.000000000 +0100 @@ -38,7 +38,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/SAX/Generator.pm new/XML-LibXML-1.90/lib/XML/LibXML/SAX/Generator.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/SAX/Generator.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/SAX/Generator.pm 2012-01-08 19:56:33.000000000 +0100 @@ -14,7 +14,7 @@ use XML::LibXML; use vars qw ($VERSION); -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE sub CLONE_SKIP { return $XML::LibXML::__threads_shared ? 0 : 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/SAX/Parser.pm new/XML-LibXML-1.90/lib/XML/LibXML/SAX/Parser.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/SAX/Parser.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/SAX/Parser.pm 2012-01-08 19:56:33.000000000 +0100 @@ -17,7 +17,7 @@ use XML::SAX::Base; use XML::SAX::DocumentLocator; -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE @ISA = ('XML::SAX::Base'); sub CLONE_SKIP { @@ -121,7 +121,7 @@ elsif ($node_type == XML_DOCUMENT_NODE || $node_type == XML_HTML_DOCUMENT_NODE || $node_type == XML_DOCUMENT_FRAG_NODE) { - # some times it is just usefull to generate SAX events from + # sometimes it is just useful to generate SAX events from # a document fragment (very good with filters). foreach my $kid ($node->childNodes) { $self->process_node($kid); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/SAX.pm new/XML-LibXML-1.90/lib/XML/LibXML/SAX.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/SAX.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/SAX.pm 2012-01-08 19:56:33.000000000 +0100 @@ -12,7 +12,7 @@ use strict; use vars qw($VERSION @ISA); -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE use XML::LibXML; use XML::SAX::Base; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/SAX.pod new/XML-LibXML-1.90/lib/XML/LibXML/SAX.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/SAX.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/SAX.pod 2012-01-08 19:57:10.000000000 +0100 @@ -47,7 +47,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Schema.pod new/XML-LibXML-1.90/lib/XML/LibXML/Schema.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Schema.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Schema.pod 2012-01-08 19:57:10.000000000 +0100 @@ -65,7 +65,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/Text.pod new/XML-LibXML-1.90/lib/XML/LibXML/Text.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/Text.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/Text.pod 2012-01-08 19:57:10.000000000 +0100 @@ -170,7 +170,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/XPathContext.pm new/XML-LibXML-1.90/lib/XML/LibXML/XPathContext.pm --- old/XML-LibXML-1.88/lib/XML/LibXML/XPathContext.pm 2011-09-21 11:55:52.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/XPathContext.pm 2012-01-08 19:56:33.000000000 +0100 @@ -16,7 +16,7 @@ use XML::LibXML; use XML::LibXML::NodeList; -$VERSION = "1.88"; # VERSION TEMPLATE: DO NOT CHANGE +$VERSION = "1.90"; # VERSION TEMPLATE: DO NOT CHANGE # should LibXML XPath data types be used for simple objects # when passing parameters to extension functions (default: no) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/XPathContext.pod new/XML-LibXML-1.90/lib/XML/LibXML/XPathContext.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/XPathContext.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/XPathContext.pod 2012-01-08 19:57:10.000000000 +0100 @@ -359,7 +359,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/lib/XML/LibXML/XPathExpression.pod new/XML-LibXML-1.90/lib/XML/LibXML/XPathExpression.pod --- old/XML-LibXML-1.88/lib/XML/LibXML/XPathExpression.pod 2011-09-21 11:56:22.000000000 +0200 +++ new/XML-LibXML-1.90/lib/XML/LibXML/XPathExpression.pod 2012-01-08 19:57:10.000000000 +0100 @@ -52,7 +52,7 @@ =head1 VERSION -1.88 +1.90 =head1 COPYRIGHT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/perl-libxml-mm.h new/XML-LibXML-1.90/perl-libxml-mm.h --- old/XML-LibXML-1.88/perl-libxml-mm.h 2011-06-09 16:23:10.000000000 +0200 +++ new/XML-LibXML-1.90/perl-libxml-mm.h 2011-10-03 08:12:15.000000000 +0200 @@ -302,7 +302,7 @@ * * DESCRIPTION * creates an Gdome node from our XML::LibXML node. - * this function is very usefull for the parser. + * this function is very useful for the parser. * * the function will only work, if XML::LibXML is compiled with * XML::GDOME support. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/perl-libxml-sax.c new/XML-LibXML-1.90/perl-libxml-sax.c --- old/XML-LibXML-1.88/perl-libxml-sax.c 2011-09-06 18:00:23.000000000 +0200 +++ new/XML-LibXML-1.90/perl-libxml-sax.c 2011-10-03 08:12:15.000000000 +0200 @@ -87,7 +87,7 @@ static U32 SystemIdHash; /* helper function C2Sv is ment to work faster than the perl-libxml-mm - version. this shortcut is usefull, because SAX handles only UTF8 + version. this shortcut is useful, because SAX handles only UTF8 strings, so there is no conversion logic required. */ SV* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/t/02parse.t new/XML-LibXML-1.90/t/02parse.t --- old/XML-LibXML-1.88/t/02parse.t 2011-07-03 00:02:21.000000000 +0200 +++ new/XML-LibXML-1.90/t/02parse.t 2011-10-03 08:12:15.000000000 +0200 @@ -235,7 +235,7 @@ my $re = qr/\ACould not create file parser context for file "\Q$badfile2\E": \Q$err_string\E/; eval { $parser->parse_file($badfile2); }; - like($@, $re, "error parsing non-existant $badfile2"); + like($@, $re, "error parsing non-existent $badfile2"); } { @@ -267,7 +267,7 @@ $fh = IO::File->new($badfile2); eval { my $doc = $parser->parse_fh($fh); }; -like($@, qr/^Can't use an undefined value as a symbol reference at/, "error parsing bad file from file handle of non-existant $badfile2"); +like($@, qr/^Can't use an undefined value as a symbol reference at/, "error parsing bad file from file handle of non-existent $badfile2"); { $parser->expand_entities(1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/t/42common.t new/XML-LibXML-1.90/t/42common.t --- old/XML-LibXML-1.88/t/42common.t 2011-06-30 19:32:53.000000000 +0200 +++ new/XML-LibXML-1.90/t/42common.t 2011-10-03 08:12:15.000000000 +0200 @@ -83,7 +83,7 @@ ok (!defined(decodeFromUTF8( 'UTF-16' , undef )), 'decodeFromUTF8 of undef.'); # here should be a test to test badly encoded strings. but for some -# reasons i am unable to create an apropriate test :( +# reasons i am unable to create an appropriate test :( # uncomment these lines if your system is capable to handel not only i # so latin 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/t/50devel.t new/XML-LibXML-1.90/t/50devel.t --- old/XML-LibXML-1.88/t/50devel.t 1970-01-01 01:00:00.000000000 +0100 +++ new/XML-LibXML-1.90/t/50devel.t 2011-10-27 19:41:44.000000000 +0200 @@ -0,0 +1,93 @@ +use Test::More; +BEGIN { plan tests => 18 }; + +use warnings; +use strict; + +BEGIN {$ENV{'DEBUG_MEMORY'} = 1;} +use XML::LibXML; +use XML::LibXML::Devel qw(:all); + +$|=1; + +# Base line +{ + my $doc = XML::LibXML::Document->new(); + + my $raw; + my $mem_before = mem_used(); + { + my $node = $doc->createTextNode("Hello"); + + $raw = node_from_perl($node); + refcnt_inc($raw); + } + cmp_ok(mem_used(), '>', $mem_before); + is(refcnt_dec($raw), 1); + is(mem_used(), $mem_before); + + # Next group of checks - multiple nodes + my ($rawT, $rawN); + $mem_before = mem_used(); + { + my $node = XML::LibXML::Element->new( 'text' ); + my $text = $doc->createTextNode( "Hello" ); + + $rawN = node_from_perl($node); + $rawT = node_from_perl($text); + + refcnt_inc($rawN); + refcnt_inc($rawT); + + $node->appendChild($text); + + # Done by appendChild + # fix_owner($rawT, $rawN); + } + cmp_ok(mem_used(), '>', $mem_before); + is(refcnt_dec($rawN), 2); + is(refcnt_dec($rawT), 1); + is(mem_used(), $mem_before); + + # The owner node remains until the last node is gone + my ($rawR, $rawD); + $mem_before = mem_used(); + { + my $dom = XML::LibXML->load_xml(string => <<'EOT'); +<?xml version="1.0"?> +<test> + <text>Hello</text> +</test> +EOT + my ($root) = $dom->getElementsByTagName('test'); + $rawR = node_from_perl($root); + $rawD = node_from_perl($dom); + + is(refcnt($rawR), 1); + is(refcnt($rawD), 2); + + my ($node) = $dom->getElementsByTagName('text'); + $rawN = node_from_perl($node); + + is(refcnt($rawN), 1); + is(refcnt($rawR), 1); + is(refcnt($rawD), 3); + + refcnt_inc($rawN); + + is(refcnt($rawD), 3); + + my $child = $node->firstChild; + + is(refcnt($rawD), 4); + } + cmp_ok(mem_used(), '>', $mem_before); + # $rawR's proxy node is no longer accessible + # but $rawD still has one + is(refcnt($rawD), 1); + is(refcnt_dec($rawN), 1); + is(mem_used(), $mem_before); + +} + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-LibXML-1.88/xpath.c new/XML-LibXML-1.90/xpath.c --- old/XML-LibXML-1.88/xpath.c 2011-07-21 14:06:43.000000000 +0200 +++ new/XML-LibXML-1.90/xpath.c 2011-10-03 08:12:15.000000000 +0200 @@ -178,7 +178,7 @@ if ( refNode->doc == NULL ) { /* if one XPaths a node from a fragment, libxml2 will - refuse the lookup. this is not very usefull for XML + refuse the lookup. this is not very useful for XML scripters. thus we need to create a temporary document to make libxml2 do it's job correctly. */ @@ -332,7 +332,7 @@ if ( ctxt->node->doc == NULL ) { /* if one XPaths a node from a fragment, libxml2 will - refuse the lookup. this is not very usefull for XML + refuse the lookup. this is not very useful for XML scripters. thus we need to create a temporary document to make libxml2 do it's job correctly. */ -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org