about summary refs log tree commit diff
path: root/src/libcore/uint-template
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-09-28 14:54:25 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-09-28 14:54:39 -0700
commit94f7bf98f96a14fa14c45723a9e40f348ab9d655 (patch)
treec6c3cb6baf0ca42d80b0f1e33116ffa6fba98404 /src/libcore/uint-template
parent2f4ee891199d3dffd8382742f576c3e78081634e (diff)
downloadrust-94f7bf98f96a14fa14c45723a9e40f348ab9d655.tar.gz
rust-94f7bf98f96a14fa14c45723a9e40f348ab9d655.zip
Finish de-exporting uint modules. Part of #3583.
Diffstat (limited to 'src/libcore/uint-template')
-rw-r--r--src/libcore/uint-template/u16.rs4
-rw-r--r--src/libcore/uint-template/u32.rs4
-rw-r--r--src/libcore/uint-template/u64.rs4
-rw-r--r--src/libcore/uint-template/u8.rs6
-rw-r--r--src/libcore/uint-template/uint.rs16
5 files changed, 17 insertions, 17 deletions
diff --git a/src/libcore/uint-template/u16.rs b/src/libcore/uint-template/u16.rs
index b84b975c685..d8e078eb65c 100644
--- a/src/libcore/uint-template/u16.rs
+++ b/src/libcore/uint-template/u16.rs
@@ -1,2 +1,2 @@
-type T = u16;
-const bits: uint = 16;
+pub type T = u16;
+pub const bits: uint = 16;
diff --git a/src/libcore/uint-template/u32.rs b/src/libcore/uint-template/u32.rs
index d5324e03a16..0e2eb2f09e1 100644
--- a/src/libcore/uint-template/u32.rs
+++ b/src/libcore/uint-template/u32.rs
@@ -1,2 +1,2 @@
-type T = u32;
-const bits: uint = 32;
\ No newline at end of file
+pub type T = u32;
+pub const bits: uint = 32;
\ No newline at end of file
diff --git a/src/libcore/uint-template/u64.rs b/src/libcore/uint-template/u64.rs
index ee7f35bf6e3..030c6379628 100644
--- a/src/libcore/uint-template/u64.rs
+++ b/src/libcore/uint-template/u64.rs
@@ -1,2 +1,2 @@
-type T = u64;
-const bits: uint = 64;
\ No newline at end of file
+pub type T = u64;
+pub const bits: uint = 64;
\ No newline at end of file
diff --git a/src/libcore/uint-template/u8.rs b/src/libcore/uint-template/u8.rs
index b7df2605db4..539567a2cfd 100644
--- a/src/libcore/uint-template/u8.rs
+++ b/src/libcore/uint-template/u8.rs
@@ -1,7 +1,7 @@
-type T = u8;
-const bits: uint = 8;
+pub type T = u8;
+pub const bits: uint = 8;
 
 // Type-specific functions here. These must be reexported by the
 // parent module so that they appear in core::u8 and not core::u8::u8;
 
-pure fn is_ascii(x: T) -> bool { return 0 as T == x & 128 as T; }
+pub pure fn is_ascii(x: T) -> bool { return 0 as T == x & 128 as T; }
diff --git a/src/libcore/uint-template/uint.rs b/src/libcore/uint-template/uint.rs
index a02ce84052e..24beaad4d5e 100644
--- a/src/libcore/uint-template/uint.rs
+++ b/src/libcore/uint-template/uint.rs
@@ -1,11 +1,11 @@
-type T = uint;
+pub type T = uint;
 
 #[cfg(target_arch = "x86")]
 #[cfg(target_arch = "arm")]
-const bits: uint = 32;
+pub const bits: uint = 32;
 
 #[cfg(target_arch = "x86_64")]
-const bits: uint = 64;
+pub const bits: uint = 64;
 
 /**
  * Divide two numbers, return the result, rounded up.
@@ -19,7 +19,7 @@ const bits: uint = 64;
  *
  * The smallest integer `q` such that `x/y <= q`.
  */
-pure fn div_ceil(x: uint, y: uint) -> uint {
+pub pure fn div_ceil(x: uint, y: uint) -> uint {
     let div = x / y;
     if x % y == 0u { div }
     else { div + 1u }
@@ -37,7 +37,7 @@ pure fn div_ceil(x: uint, y: uint) -> uint {
  *
  * The integer `q` closest to `x/y`.
  */
-pure fn div_round(x: uint, y: uint) -> uint {
+pub pure fn div_round(x: uint, y: uint) -> uint {
     let div = x / y;
     if x % y * 2u  < y { div }
     else { div + 1u }
@@ -58,7 +58,7 @@ pure fn div_round(x: uint, y: uint) -> uint {
  * The smallest integer `q` such that `x/y <= q`. This
  * is either `x/y` or `x/y + 1`.
  */
-pure fn div_floor(x: uint, y: uint) -> uint { return x / y; }
+pub pure fn div_floor(x: uint, y: uint) -> uint { return x / y; }
 
 /**
  * Iterate over the range [`lo`..`hi`), or stop when requested
@@ -75,7 +75,7 @@ pure fn div_floor(x: uint, y: uint) -> uint { return x / y; }
  * `true` If execution proceeded correctly, `false` if it was interrupted,
  * that is if `it` returned `false` at any point.
  */
-pure fn iterate(lo: uint, hi: uint, it: fn(uint) -> bool) -> bool {
+pub pure fn iterate(lo: uint, hi: uint, it: fn(uint) -> bool) -> bool {
     let mut i = lo;
     while i < hi {
         if (!it(i)) { return false; }
@@ -86,7 +86,7 @@ pure fn iterate(lo: uint, hi: uint, it: fn(uint) -> bool) -> bool {
 
 /// Returns the smallest power of 2 greater than or equal to `n`
 #[inline(always)]
-fn next_power_of_two(n: uint) -> uint {
+pub fn next_power_of_two(n: uint) -> uint {
     let halfbits: uint = sys::size_of::<uint>() * 4u;
     let mut tmp: uint = n - 1u;
     let mut shift: uint = 1u;