[gxml] DOM: Removing more ulong/long references



commit 411247603bb5943a18c2a963a70cdd173d7ac737
Author: Daniel Espinosa <esodan gmail com>
Date:   Thu Oct 27 14:58:11 2016 -0500

    DOM: Removing more ulong/long references

 gxml/DomCollections.vala     |   46 +++++++++++++++++++++---------------------
 gxml/DomDocument.vala        |    4 +-
 gxml/GXmlDocument.vala       |   18 ++++++++--------
 gxml/GXmlDomCollections.vala |    8 +++---
 gxml/GXmlElement.vala        |    2 +-
 gxml/GXmlHashMapAttr.vala    |    4 +-
 gxml/GXmlListChildren.vala   |    2 +-
 gxml/GomDocument.vala        |    8 +++---
 gxml/GomElement.vala         |    6 ++--
 gxml/GomNode.vala            |    2 +-
 10 files changed, 50 insertions(+), 50 deletions(-)
---
diff --git a/gxml/DomCollections.vala b/gxml/DomCollections.vala
index 0020b5e..6ceafe5 100644
--- a/gxml/DomCollections.vala
+++ b/gxml/DomCollections.vala
@@ -29,7 +29,7 @@ public interface GXml.DomParentNode : GLib.Object {
   public abstract DomHTMLCollection children { owned get; }
   public abstract DomElement? first_element_child { owned get; }
   public abstract DomElement? last_element_child { owned get; }
-  public abstract ulong child_element_count { get; }
+  public abstract int child_element_count { get; }
 
   public abstract DomElement? query_selector (string selectors) throws GLib.Error;
   public abstract DomNodeList query_selector_all (string selectors) throws GLib.Error;
@@ -68,7 +68,7 @@ public interface GXml.DomChildNode : GLib.Object {
 
 
 public interface GXml.DomNodeList : GLib.Object, Gee.BidirList<GXml.DomNode>  {
-  public abstract DomNode? item (ulong index);
+  public abstract DomNode? item (int index);
   public abstract int length { get; }
 }
 
@@ -77,8 +77,8 @@ public interface GXml.DomHTMLCollection : GLib.Object, Gee.BidirList<GXml.DomEle
   public virtual new GXml.DomElement[] to_array () {
     return (GXml.DomElement[]) ((Gee.Collection<GXml.Element>) this).to_array ();
   }
-  public virtual ulong length { get { return (ulong) size; } }
-  public virtual DomElement? item (ulong index) { return this.get ((int) index); }
+  public virtual int length { get { return (int) size; } }
+  public virtual DomElement? item (int index) { return this.get ((int) index); }
   public virtual DomElement? named_item (string name) {
       foreach (GXml.DomElement e in this) {
           if (e.node_name == name) return e;
@@ -95,7 +95,7 @@ public interface GXml.DomNodeIterator {
   public abstract DomNode root { get; }
   public abstract DomNode reference_node { get; }
   public abstract bool pointer_before_reference_node { get; }
-  public abstract ulong what_to_show { get; }
+  public abstract int what_to_show { get; }
   public abstract DomNodeFilter? filter { get; }
 
   public abstract DomNode? next_node();
@@ -114,19 +114,19 @@ public class GXml.DomNodeFilter : Object {
   public const ushort FILTER_SKIP = 3;
 
   // Constants for whatToShow
-  public const ulong SHOW_ALL = (ulong) 0xFFFFFFFF;
-  public const ulong SHOW_ELEMENT = (ulong) 0x1;
-  public const ulong SHOW_ATTRIBUTE = (ulong) 0x2; // historical
-  public const ulong SHOW_TEXT = (ulong) 0x4;
-  public const ulong SHOW_CDATA_SECTION = (ulong) 0x8; // historical
-  public const ulong SHOW_ENTITY_REFERENCE = (ulong) 0x10; // historical
-  public const ulong SHOW_ENTITY = (ulong) 0x20; // historical
-  public const ulong SHOW_PROCESSING_INSTRUCTION = (ulong) 0x40;
-  public const ulong SHOW_COMMENT = (ulong) 0x80;
-  public const ulong SHOW_DOCUMENT = (ulong) 0x100;
-  public const ulong SHOW_DOCUMENT_TYPE = (ulong) 0x200;
-  public const ulong SHOW_DOCUMENT_FRAGMENT = (ulong) 0x400;
-  public const ulong SHOW_NOTATION = (ulong) 0x800; // historical
+  public const int SHOW_ALL = (int) 0xFFFFFFFF;
+  public const int SHOW_ELEMENT = (int) 0x1;
+  public const int SHOW_ATTRIBUTE = (int) 0x2; // historical
+  public const int SHOW_TEXT = (int) 0x4;
+  public const int SHOW_CDATA_SECTION = (int) 0x8; // historical
+  public const int SHOW_ENTITY_REFERENCE = (int) 0x10; // historical
+  public const int SHOW_ENTITY = (int) 0x20; // historical
+  public const int SHOW_PROCESSING_INSTRUCTION = (int) 0x40;
+  public const int SHOW_COMMENT = (int) 0x80;
+  public const int SHOW_DOCUMENT = (int) 0x100;
+  public const int SHOW_DOCUMENT_TYPE = (int) 0x200;
+  public const int SHOW_DOCUMENT_FRAGMENT = (int) 0x400;
+  public const int SHOW_NOTATION = (int) 0x800; // historical
 
   public delegate ushort AcceptNode(Node node); // FIXME: Should be a User defined method
 }
@@ -137,7 +137,7 @@ public class GXml.DomNodeFilter : Object {
  */
 public interface GXml.DomTreeWalker : Object {
   public abstract DomNode root { get; }
-  public abstract ulong what_to_show { get; }
+  public abstract int what_to_show { get; }
   public abstract DomNodeFilter? filter { get; }
   public abstract DomNode current_node { get; }
 
@@ -151,8 +151,8 @@ public interface GXml.DomTreeWalker : Object {
 }
 
 public interface GXml.DomNamedNodeMap : Object, Gee.Map<string,DomNode> {
-  public abstract ulong length { get; }
-  public abstract DomNode? item (ulong index);
+  public abstract int length { get; }
+  public abstract DomNode? item (int index);
   public abstract DomNode? get_named_item (string name);
   public abstract DomNode? set_named_item (DomNode node) throws GLib.Error;
   public abstract DomNode? remove_named_item (string name) throws GLib.Error;
@@ -165,8 +165,8 @@ public interface GXml.DomNamedNodeMap : Object, Gee.Map<string,DomNode> {
 }
 
 public interface GXml.DomTokenList : GLib.Object, Gee.BidirList<string> {
-  public abstract ulong   length   { get; }
-  public abstract string? item     (ulong index);
+  public abstract int   length   { get; }
+  public abstract string? item     (int index);
   public abstract bool    contains (string token) throws GLib.Error;
   public abstract void    add      (string[] tokens) throws GLib.Error;
   public abstract void    remove   (string[] tokens);
diff --git a/gxml/DomDocument.vala b/gxml/DomDocument.vala
index 5458420..9837331 100644
--- a/gxml/DomDocument.vala
+++ b/gxml/DomDocument.vala
@@ -64,12 +64,12 @@ public interface GXml.DomDocument : GLib.Object,
   /**
    * No implemented jet. This can lead to API changes in future versions.
    */
-  public abstract DomNodeIterator create_node_iterator (DomNode root, ulong whatToShow = (ulong) 0xFFFFFFFF, 
DomNodeFilter? filter = null);
+  public abstract DomNodeIterator create_node_iterator (DomNode root, int whatToShow = (int) 0xFFFFFFFF, 
DomNodeFilter? filter = null);
 
   /**
    * No implemented jet. This can lead to API changes in future versions.
    */
-  public abstract DomTreeWalker create_tree_walker (DomNode root, ulong what_to_show = (ulong) 0xFFFFFFFF, 
DomNodeFilter? filter = null);
+  public abstract DomTreeWalker create_tree_walker (DomNode root, int what_to_show = (int) 0xFFFFFFFF, 
DomNodeFilter? filter = null);
 }
 
 public interface GXml.DomXMLDocument : GLib.Object, GXml.DomDocument {}
diff --git a/gxml/GXmlDocument.vala b/gxml/GXmlDocument.vala
index 2b3fe56..258945c 100644
--- a/gxml/GXmlDocument.vala
+++ b/gxml/GXmlDocument.vala
@@ -328,11 +328,11 @@ public class GXml.GDocument : GXml.GNode,
   }
 
   // NodeFilter.SHOW_ALL = 0xFFFFFFFF
-  public DomNodeIterator create_node_iterator (DomNode root, ulong what_to_show = (ulong) 0xFFFFFFFF, 
DomNodeFilter? filter = null)
+  public DomNodeIterator create_node_iterator (DomNode root, int what_to_show = (int) 0xFFFFFFFF, 
DomNodeFilter? filter = null)
   {
     return new GDomNodeIterator (root, what_to_show, filter);
   }
-  public DomTreeWalker create_tree_walker (DomNode root, ulong what_to_show = (ulong) 0xFFFFFFFF, 
DomNodeFilter? filter = null) {
+  public DomTreeWalker create_tree_walker (DomNode root, int what_to_show = (int) 0xFFFFFFFF, DomNodeFilter? 
filter = null) {
       return new GDomTreeWalker (root, what_to_show, filter);
   }
   // DomParentNode
@@ -343,7 +343,7 @@ public class GXml.GDocument : GXml.GNode,
   public DomElement? last_element_child {
     owned get { return (DomElement) (this as Document).children_nodes.last (); }
   }
-  public ulong child_element_count { get { return (ulong) children_nodes.size; } }
+  public int child_element_count { get { return children_nodes.size; } }
 
   public DomElement? query_selector (string selectors) throws GLib.Error {
     return null; // FIXME
@@ -431,9 +431,9 @@ public class GXml.GDomNodeIterator : Object, GXml.DomNodeIterator {
   protected DomNode _root;
   protected DomNode _reference_node;
   protected bool _pointer_before_reference_node;
-  protected ulong _what_to_show;
+  protected int _what_to_show;
   protected DomNodeFilter _filter;
-  public GDomNodeIterator (DomNode n, ulong what_to_show, DomNodeFilter filter) {
+  public GDomNodeIterator (DomNode n, int what_to_show, DomNodeFilter filter) {
     _root = n;
     _what_to_show = what_to_show;
     _filter = filter;
@@ -441,7 +441,7 @@ public class GXml.GDomNodeIterator : Object, GXml.DomNodeIterator {
   public DomNode root { get { return _root; } }
   public DomNode reference_node { get { return _reference_node; } }
   public bool pointer_before_reference_node { get { return _pointer_before_reference_node; } }
-  public ulong what_to_show { get { return _what_to_show; } }
+  public int what_to_show { get { return _what_to_show; } }
   public DomNodeFilter? filter { get { return _filter; } }
 
   public DomNode? next_node() { return null; } // FIXME
@@ -453,16 +453,16 @@ public class GXml.GDomNodeIterator : Object, GXml.DomNodeIterator {
 
 public class GXml.GDomTreeWalker : Object, GXml.DomTreeWalker {
   protected DomNode _root;
-  protected ulong _what_to_show;
+  protected int _what_to_show;
   protected DomNodeFilter? _filter;
   protected  DomNode _current_node;
 
   public DomNode root { get { return root; } }
-  public ulong what_to_show { get { return _what_to_show; } }
+  public int what_to_show { get { return _what_to_show; } }
   public DomNodeFilter? filter { get { return _filter; } }
   public DomNode current_node { get { return _current_node; } }
 
-  public GDomTreeWalker (DomNode r, ulong w, DomNodeFilter f) {
+  public GDomTreeWalker (DomNode r, int w, DomNodeFilter f) {
     _root = r;
     _what_to_show = w;
     _filter = f;
diff --git a/gxml/GXmlDomCollections.vala b/gxml/GXmlDomCollections.vala
index 9db4299..6f8ec0e 100644
--- a/gxml/GXmlDomCollections.vala
+++ b/gxml/GXmlDomCollections.vala
@@ -29,8 +29,8 @@ public class GXml.GDomTokenList : Gee.ArrayList<string>, GXml.DomTokenList {
   protected DomElement _element;
   protected string _attr = null;
 
-  public ulong length { get { return size; } }
-  public string? item (ulong index) { return base.get ((int) index); }
+  public int length { get { return size; } }
+  public string? item (int index) { return base.get (index); }
 
   public GDomTokenList (DomElement e, string? attr) {
     _element = e;
@@ -128,8 +128,8 @@ public class GXml.GDomSettableTokenList : GXml.GDomTokenList, GXml.DomSettableTo
 public class GXml.GDomHTMLCollection : Gee.ArrayList<GXml.DomElement>,
               GXml.DomHTMLCollection
 {
-  public ulong length { get { return size; } }
-  public DomElement? item (ulong index) { return base.get ((int) index); }
+  public int length { get { return size; } }
+  public DomElement? item (int index) { return base.get (index); }
   public DomElement? named_item (string name) {
     foreach (DomElement e in this) {
       if (e.node_name == name) return e;
diff --git a/gxml/GXmlElement.vala b/gxml/GXmlElement.vala
index 2abe2b8..8d8a3f2 100644
--- a/gxml/GXmlElement.vala
+++ b/gxml/GXmlElement.vala
@@ -310,7 +310,7 @@ public class GXml.GElement : GXml.GNonDocumentChildNode,
   }
   public DomElement? first_element_child { owned get { return (DomElement) children.first (); } }
   public DomElement? last_element_child { owned get { return (DomElement) children.last (); } }
-  public ulong child_element_count { get { return (ulong) children.size; } }
+  public int child_element_count { get { return children.size; } }
 
   public DomElement? query_selector (string selectors) throws GLib.Error {
   // FIXME:
diff --git a/gxml/GXmlHashMapAttr.vala b/gxml/GXmlHashMapAttr.vala
index 0ae9502..bb28910 100644
--- a/gxml/GXmlHashMapAttr.vala
+++ b/gxml/GXmlHashMapAttr.vala
@@ -210,7 +210,7 @@ public class GXml.GHashMapAttr : Gee.AbstractMap<string,GXml.Node>,
     public bool valid { get { return _current != null; } }
   }
   // DomNamedNodeMap
-  public ulong length { get { return size; } }
+  public int length { get { return size; } }
 
   public DomNode? get_named_item (string name) {
     return (DomNode?) this.get (name);
@@ -225,7 +225,7 @@ public class GXml.GHashMapAttr : Gee.AbstractMap<string,GXml.Node>,
    *
    * @param index of required {@link DomNode}
    */
-  public DomNode? item (ulong index) {
+  public DomNode? item (int index) {
     int i = 0;
     if (index > size) return null;
     foreach (GXml.Node node in values) {
diff --git a/gxml/GXmlListChildren.vala b/gxml/GXmlListChildren.vala
index 72b24b9..5c55409 100644
--- a/gxml/GXmlListChildren.vala
+++ b/gxml/GXmlListChildren.vala
@@ -249,7 +249,7 @@ public class GXml.GListChildren : AbstractBidirList<GXml.Node>,
     }
   }
   // DomNodeList implementation
-  public DomNode? item (ulong index) { return (DomNode) @get ((int) index); }
+  public DomNode? item (int index) { return (DomNode) @get (index); }
   public int length { get { return size; } }
   // DomHTMLCollection
   public new GXml.DomElement? get_element (int index) {
diff --git a/gxml/GomDocument.vala b/gxml/GomDocument.vala
index a961cc3..07232e4 100644
--- a/gxml/GomDocument.vala
+++ b/gxml/GomDocument.vala
@@ -175,11 +175,11 @@ public class GXml.GomDocument : GomNode,
   }
 
   // NodeFilter.SHOW_ALL = 0xFFFFFFFF
-  public DomNodeIterator create_node_iterator (DomNode root, ulong what_to_show = (ulong) 0xFFFFFFFF, 
DomNodeFilter? filter = null)
+  public DomNodeIterator create_node_iterator (DomNode root, int what_to_show = (int) 0xFFFFFFFF, 
DomNodeFilter? filter = null)
   {
     return new GDomNodeIterator (root, what_to_show, filter);
   }
-  public DomTreeWalker create_tree_walker (DomNode root, ulong what_to_show = (ulong) 0xFFFFFFFF, 
DomNodeFilter? filter = null) {
+  public DomTreeWalker create_tree_walker (DomNode root, int what_to_show = (int) 0xFFFFFFFF, DomNodeFilter? 
filter = null) {
       return new GDomTreeWalker (root, what_to_show, filter);
   }
   // DomParentNode
@@ -190,7 +190,7 @@ public class GXml.GomDocument : GomNode,
   public DomElement? last_element_child {
     owned get { return (DomElement) child_nodes.last (); }
   }
-  public ulong child_element_count { get { return (ulong) child_nodes.size; } }
+  public int child_element_count { get { return child_nodes.size; } }
 
   public DomElement? query_selector (string selectors) throws GLib.Error {
     return null; // FIXME
@@ -289,7 +289,7 @@ public class GXml.GomDocumentFragment : GXml.GomNode,
   }
   public DomElement? first_element_child { owned get { return (DomElement) children.first (); } }
   public DomElement? last_element_child { owned get { return (DomElement) children.last (); } }
-  public ulong child_element_count { get { return (ulong) children.size; } }
+  public int child_element_count { get { return (int) children.size; } }
 
   public DomElement? query_selector (string selectors) throws GLib.Error {
   // FIXME:
diff --git a/gxml/GomElement.vala b/gxml/GomElement.vala
index 81826d7..03eafdd 100644
--- a/gxml/GomElement.vala
+++ b/gxml/GomElement.vala
@@ -117,7 +117,7 @@ public class GXml.GomElement : GomNode,
   }
   public DomElement? first_element_child { owned get { return (DomElement) children.first (); } }
   public DomElement? last_element_child { owned get { return (DomElement) children.last (); } }
-  public ulong child_element_count { get { return (ulong) children.size; } }
+  public int child_element_count { get { return children.size; } }
 
   public DomElement? query_selector (string selectors) throws GLib.Error {
   // FIXME:
@@ -179,8 +179,8 @@ public class GXml.GomElement : GomNode,
    */
   public class Attributes : HashMap<string,string>, DomNamedNodeMap  {
     protected GomElement _element;
-    public ulong length { get { return (ulong) size; } }
-    public DomNode? item (ulong index) { return null; }
+    public int length { get { return size; } }
+    public DomNode? item (int index) { return null; }
 
     public Attributes (GomElement element) {
       _element = element;
diff --git a/gxml/GomNode.vala b/gxml/GomNode.vala
index 8b23565..3b9cd34 100644
--- a/gxml/GomNode.vala
+++ b/gxml/GomNode.vala
@@ -270,6 +270,6 @@ public class GXml.GomNode : Object,
  * List of {@link DomNode} implementing {@link DomNodeList}
  */
 public class GXml.GomNodeList : Gee.ArrayList<DomNode>, DomNodeList {
-  public DomNode? item (ulong index) { return base.get ((int) index); }
+  public DomNode? item (int index) { return base.get (index); }
   public int length { get { return size; } }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]