Skip to content

Commit 301b852

Browse files
committed
---
yaml --- r: 47763 b: refs/heads/incoming c: a01ef8e h: refs/heads/master i: 47761: 44738fc 47759: ad059c2 v: v3
1 parent bce9c7f commit 301b852

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: 91fae2791292c7374143e82814a375a12bfd4e83
9+
refs/heads/incoming: a01ef8ef87d9697307c5d4fec4d1fa1ede0d65ae
1010
refs/heads/dist-snap: 8b98e5a296d95c5e832db0756828e5bec31c6f50
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libstd/bitv.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@ use core::vec;
1616

1717
struct SmallBitv {
1818
/// only the lowest nbits of this value are used. the rest is undefined.
19-
bits: u32
19+
bits: uint
2020
}
2121

2222
/// a mask that has a 1 for each defined bit in a small_bitv, assuming n bits
2323
#[inline(always)]
24-
fn small_mask(nbits: uint) -> u32 {
24+
fn small_mask(nbits: uint) -> uint {
2525
(1 << nbits) - 1
2626
}
2727

2828
impl SmallBitv {
29-
static fn new(bits: u32) -> SmallBitv {
29+
static fn new(bits: uint) -> SmallBitv {
3030
SmallBitv {bits: bits}
3131
}
3232

3333
#[inline(always)]
34-
fn bits_op(&mut self, right_bits: u32, nbits: uint,
35-
f: fn(u32, u32) -> u32) -> bool {
34+
fn bits_op(&mut self, right_bits: uint, nbits: uint,
35+
f: fn(uint, uint) -> uint) -> bool {
3636
let mask = small_mask(nbits);
37-
let old_b: u32 = self.bits;
37+
let old_b: uint = self.bits;
3838
let new_b = f(old_b, right_bits);
3939
self.bits = new_b;
4040
mask & old_b != mask & new_b
@@ -71,7 +71,7 @@ impl SmallBitv {
7171
self.bits |= 1<<i;
7272
}
7373
else {
74-
self.bits &= !(1<<i as u32);
74+
self.bits &= !(1<<i as uint);
7575
}
7676
}
7777

@@ -259,7 +259,7 @@ priv impl Bitv {
259259
260260
impl Bitv {
261261
static fn new(nbits: uint, init: bool) -> Bitv {
262-
let rep = if nbits <= 32 {
262+
let rep = if nbits <= uint::bits {
263263
Small(~SmallBitv::new(if init {!0} else {0}))
264264
}
265265
else {

0 commit comments

Comments
 (0)