Re: bug in gdome_xml_n_mkref

Luca Padovani <[email protected]> Thu, 06 May 2004 17:49:15 +0200
Newsgroups gmane.comp.gnome.gdome
Message-ID <1083858555.16016.16.camel@giraffe>
On Wed, 2004-05-05 at 23:28, Luca Padovani wrote:
> If you all agree with my diagnosis I'll try a patch shortly.

the attached naive patch seems to fix the problem. If noone objects I'll
commit it and we may plan for a 0.8.2 soon.

--luca
gdome2_patch (text/x-patch, 693 B)
Index: gdome-xml-node.c
===================================================================
RCS file: /cvs/gnome/gdome2/libgdome/gdomecore/gdome-xml-node.c,v
retrieving revision 1.76
diff -c -r1.76 gdome-xml-node.c
*** gdome-xml-node.c	3 Oct 2003 15:53:33 -0000	1.76
--- gdome-xml-node.c	6 May 2004 15:49:59 -0000
***************
*** 165,170 ****
--- 165,175 ----
  	if (n->_private && type != XML_NAMESPACE_DECL) {
  		result = (Gdome_xml_Node *)n->_private;
  		result->refcnt++;
+ 
+ 		if (type == XML_DOCUMENT_NODE) {
+ 			Gdome_xml_Document* doc = (Gdome_xml_Node *)n->_private;
+ 			doc->livenodes++;
+ 		}
  	} else {
  		switch (type) {
  		case XML_ELEMENT_NODE:
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBAml57TJ/x5YuoHVwRAlIgAJ9/lepQsUCD1m3acsduo0obRrTtiQCfVSJC
fIwTnzbbXYhjHgpwi1sG4QQ=
=QgFU
-----END PGP SIGNATURE-----