[gxml: 11/18] Revert "* try using an xmlList to track unattached nodes and free them separately from the tree; (do
- From: Richard Hans Schwarting <rschwart src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml: 11/18] Revert "* try using an xmlList to track unattached nodes and free them separately from the tree; (do
- Date: Tue, 18 Jun 2013 18:14:53 +0000 (UTC)
commit e8a029e7cd1851a521f341e95f3bcedf2afdcbb7
Author: Richard Schwarting <aquarichy gmail com>
Date: Sun Jun 9 15:36:08 2013 -0400
Revert "* try using an xmlList to track unattached nodes and free them separately from the tree; (doesn't
work)"
This reverts commit affe6df2b81eb88d15eaa6e25e0f7d937fbfa6ca.
gxml/Document.vala | 19 -------------------
vapi/libxml-2.0.vapi | 31 -------------------------------
2 files changed, 0 insertions(+), 50 deletions(-)
---
diff --git a/gxml/Document.vala b/gxml/Document.vala
index fa41003..649ade6 100644
--- a/gxml/Document.vala
+++ b/gxml/Document.vala
@@ -181,22 +181,6 @@ namespace GXml {
}
}
- /**
- * Finalise method for Document.
- */
- ~Document () {
- for (Xml.Link *front = new_nodes->front (); front != null; front = new_nodes->front
()) {
- front->get_data ()->unlink ();
- front->get_data ()->free ();
-
- new_nodes->pop_front ();
- }
-
- this.xmldoc->free (); // TODO: figure out how to properly invoke the free_function on
non-GObject VAPI'd classes
- }
-
- Xml.List *new_nodes;
-
/** Constructor */
/**
* Creates a Document based on a libxml2 Xml.Doc* object.
@@ -219,8 +203,6 @@ namespace GXml {
base.for_document ();
this.owner_document = this; // this doesn't exist until after base()
-
- this.new_nodes = new Xml.List (); // null, null);
this.xmldoc = doc;
if (doc->int_subset == null && doc->ext_subset == null) {
this.doctype = null;
@@ -438,7 +420,6 @@ namespace GXml {
Element new_elem;
xmlelem = this.xmldoc->new_node (null, tag_name, null);
- new_nodes->append (xmlelem); // TODO: might want to place this in BackedNode's
constructorr
new_elem = new Element (xmlelem, this);
return new_elem;
}
diff --git a/vapi/libxml-2.0.vapi b/vapi/libxml-2.0.vapi
index 6362807..b7269cb 100644
--- a/vapi/libxml-2.0.vapi
+++ b/vapi/libxml-2.0.vapi
@@ -384,9 +384,6 @@ namespace Xml {
[CCode (cname = "xmlDocFormatDump", instance_pos = 1.1)]
public int dump_format (GLib.FileStream f, bool format = true);
- [CCode (cname = "xmlFreeDoc")]
- public void free (); // TODO: Don't want this, find out how to free Vala objects without
defining their deconstructor; we already set free_function above anyway
-
[CCode (cname = "xmlDocGetRootElement")]
public Node* get_root_element();
@@ -640,31 +637,6 @@ namespace Xml {
}
[Compact]
- [CCode (cname = "xmlLink", cheader_filename = "libxml/list.h")]
- public class Link {
- [CCode (cname = "xmlLinkGetData")]
- public Xml.Node* get_data ();
- }
-
- [CCode (cname = "xmlListDeallocator")]
- public delegate void ListDeallocator (Xml.Link *ptr);
- [CCode (cname = "xmlListDataCompare")]
- public delegate void ListDataCompare (Xml.Link *a, Xml.Link *b);
-
- [Compact]
- [CCode (cname = "xmlList", free_function = "xmlListDelete", cheader_filename = "libxml/list.h")]
- public class List {
- [CCode (cname = "xmlListFront")]
- public Link front ();
- [CCode (cname = "xmlListPopFront")]
- public void pop_front ();
- [CCode (cname = "xmlListAppend")]
- public void append (Xml.Node *data);
- [CCode (cname = "xmlListCreate")]
- public List (ListDeallocator de = null); //, ListDataCompare co = null);
- }
-
- [Compact]
[CCode (cname = "xmlNode", free_function = "xmlFreeNode", cheader_filename = "libxml/tree.h")]
public class Node {
public ElementType type;
@@ -710,9 +682,6 @@ namespace Xml {
[CCode (cname = "xmlDocCopyNodeList")]
public Node* doc_copy_list (Doc* doc);
- [CCode (cname = "xmlFreeNode")]
- public void free (); // TODO: Don't want this, find out how to free Vala objects without
defining their deconstructor; we already set free_function above anyway
-
[CCode (cname = "xmlFreeNodeList")]
public void free_list ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]