[gxml] DOM: Removing long types from collections and range



commit acec6f381a5e64a00c680fc1513661fa9313b37a
Author: Daniel Espinosa <esodan gmail com>
Date:   Thu Oct 27 15:04:28 2016 -0500

    DOM: Removing long types from collections and range

 gxml/DomCollections.vala |    8 ++++----
 gxml/DomRange.vala       |   12 ++++++------
 gxml/GXmlDomRange.vala   |   18 +++++++++---------
 3 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/gxml/DomCollections.vala b/gxml/DomCollections.vala
index 6ceafe5..246fffe 100644
--- a/gxml/DomCollections.vala
+++ b/gxml/DomCollections.vala
@@ -109,9 +109,9 @@ public interface GXml.DomNodeIterator {
  */
 public class GXml.DomNodeFilter : Object {
   // Constants for acceptNode()
-  public const ushort FILTER_ACCEPT = 1;
-  public const ushort FILTER_REJECT = 2;
-  public const ushort FILTER_SKIP = 3;
+  public const int FILTER_ACCEPT = 1;
+  public const int FILTER_REJECT = 2;
+  public const int FILTER_SKIP = 3;
 
   // Constants for whatToShow
   public const int SHOW_ALL = (int) 0xFFFFFFFF;
@@ -128,7 +128,7 @@ public class GXml.DomNodeFilter : Object {
   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
+  public delegate int AcceptNode(Node node); // FIXME: Should be a User defined method
 }
 
 
diff --git a/gxml/DomRange.vala b/gxml/DomRange.vala
index 1733ced..64d0aae 100644
--- a/gxml/DomRange.vala
+++ b/gxml/DomRange.vala
@@ -22,14 +22,14 @@
 
 public interface GXml.DomRange : GLib.Object {
   public abstract DomNode start_container { get; }
-  public abstract ulong start_offset { get; }
+  public abstract int start_offset { get; }
   public abstract DomNode end_container { get; }
-  public abstract ulong end_offset { get; }
+  public abstract int end_offset { get; }
   public abstract bool collapsed { get; }
   public abstract DomNode common_ancestor_container { get; }
 
-  public abstract void set_start        (DomNode node, ulong offset) throws GLib.Error;
-  public abstract void set_end          (DomNode node, ulong offset) throws GLib.Error;
+  public abstract void set_start        (DomNode node, int offset) throws GLib.Error;
+  public abstract void set_end          (DomNode node, int offset) throws GLib.Error;
   public abstract void set_start_before (DomNode node) throws GLib.Error;
   public abstract void set_start_after  (DomNode node) throws GLib.Error;
   public abstract void set_end_before   (DomNode node) throws GLib.Error;
@@ -49,8 +49,8 @@ public interface GXml.DomRange : GLib.Object {
   public abstract DomRange clone_range();
   public abstract void detach ();
 
-  public abstract bool  is_point_in_range (DomNode node, ulong offset);
-  public abstract short compare_point     (DomNode node, ulong offset);
+  public abstract bool  is_point_in_range (DomNode node, int offset);
+  public abstract short compare_point     (DomNode node, int offset);
 
   public abstract bool  intersects_node   (DomNode node);
 
diff --git a/gxml/GXmlDomRange.vala b/gxml/GXmlDomRange.vala
index 0cb6895..e62e6a0 100644
--- a/gxml/GXmlDomRange.vala
+++ b/gxml/GXmlDomRange.vala
@@ -24,15 +24,15 @@
 public class GXml.GDomRange : Object, GXml.DomRange {
        protected DomDocument _document;
        protected DomNode _start_container;
-       protected ulong _start_offset;
+       protected int _start_offset;
        protected DomNode _end_container;
-       protected ulong _end_offset;
+       protected int _end_offset;
        protected bool _collapse;
        protected DomNode _common_ancestor_container;
        public DomNode start_container { get { return _start_container; } }
-       public ulong start_offset { get { return _start_offset; } }
+       public int start_offset { get { return _start_offset; } }
        public DomNode end_container { get { return _end_container; } }
-       public ulong end_offset { get { return _end_offset; } }
+       public int end_offset { get { return _end_offset; } }
        public bool collapsed { get { return _collapse; } }
        public DomNode common_ancestor_container { get { return _common_ancestor_container; } }
 
@@ -45,7 +45,7 @@ public class GXml.GDomRange : Object, GXml.DomRange {
                _common_ancestor_container = doc; //FIXME: Check spec
        }
 
-       public void set_start (DomNode node, ulong offset) throws GLib.Error {
+       public void set_start (DomNode node, int offset) throws GLib.Error {
                if (node is DomDocumentType)
                        throw new DomError.INVALID_NODE_TYPE_ERROR (_("Invalid node type to start"));
                if (node is DocumentType)
@@ -73,7 +73,7 @@ public class GXml.GDomRange : Object, GXml.DomRange {
                _start_container = node;
                _start_offset = offset;
        }
-       public void set_end (DomNode node, ulong offset) throws GLib.Error {
+       public void set_end (DomNode node, int offset) throws GLib.Error {
                if (node is DomDocumentType)
                        throw new DomError.INVALID_NODE_TYPE_ERROR (_("Invalid node type to start"));
                if (node is DocumentType)
@@ -150,7 +150,7 @@ public class GXml.GDomRange : Object, GXml.DomRange {
                if (node is DomDocumentType)
                        throw new DomError.INVALID_NODE_TYPE_ERROR (_("Invalid node type to start"));
                set_start (node, 0);
-               ulong length = 0;
+               int length = 0;
                if (node is DocumentType) length = 0;
                else
                        if (node is DomCharacterData) length = (node as DomCharacterData).length;
@@ -194,8 +194,8 @@ public class GXml.GDomRange : Object, GXml.DomRange {
        public DomRange clone_range() { return (DomRange) this.ref (); }// FIXME:
        public void detach () { return; }// FIXME:
 
-       public bool  is_point_in_range (DomNode node, ulong offset) { return false; }// FIXME:
-       public short compare_point     (DomNode node, ulong offset) { return 0; }// FIXME:
+       public bool  is_point_in_range (DomNode node, int offset) { return false; }// FIXME:
+       public short compare_point     (DomNode node, int offset) { return 0; }// FIXME:
 
        public bool  intersects_node   (DomNode node) { return false; }// FIXME:
 


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