Skip to content

Commit 8f7b386

Browse files
committed
---
yaml --- r: 30559 b: refs/heads/incoming c: 651e63c h: refs/heads/master i: 30557: 65970dd 30555: 14b3d07 30551: 412cedf 30543: 3a1505e 30527: b00b885 v: v3
1 parent 2ddc290 commit 8f7b386

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: f1f57392564a89155b404a8d326fac9d6923626b
9+
refs/heads/incoming: 651e63cc5c2b90204e8cd9d263da567fe2a66fbf
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libcore/flate.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const lz_fast : c_int = 0x1; // LZ with only one probe
1818
const lz_norm : c_int = 0x80; // LZ with 128 probes, "normal"
1919
const lz_best : c_int = 0xfff; // LZ with 4095 probes, "best"
2020

21-
fn deflate_buf(buf: &[const u8]) -> ~[u8] {
22-
do vec::as_const_buf(buf) |b, len| {
21+
fn deflate_bytes(bytes: &[const u8]) -> ~[u8] {
22+
do vec::as_const_buf(bytes) |b, len| {
2323
unsafe {
2424
let mut outsz : size_t = 0;
2525
let res =
@@ -36,8 +36,8 @@ fn deflate_buf(buf: &[const u8]) -> ~[u8] {
3636
}
3737
}
3838

39-
fn inflate_buf(buf: &[const u8]) -> ~[u8] {
40-
do vec::as_const_buf(buf) |b, len| {
39+
fn inflate_bytes(bytes: &[const u8]) -> ~[u8] {
40+
do vec::as_const_buf(bytes) |b, len| {
4141
unsafe {
4242
let mut outsz : size_t = 0;
4343
let res =
@@ -69,11 +69,11 @@ fn test_flate_round_trip() {
6969
}
7070
debug!("de/inflate of %u bytes of random word-sequences",
7171
in.len());
72-
let cmp = flate::deflate_buf(in);
73-
let out = flate::inflate_buf(cmp);
72+
let cmp = flate::deflate_bytes(in);
73+
let out = flate::inflate_bytes(cmp);
7474
debug!("%u bytes deflated to %u (%.1f%% size)",
7575
in.len(), cmp.len(),
7676
100.0 * ((cmp.len() as float) / (in.len() as float)));
7777
assert(in == out);
7878
}
79-
}
79+
}

branches/incoming/src/rustc/metadata/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ fn encode_metadata(parms: encode_parms, crate: @crate) -> ~[u8] {
11781178

11791179
(do str::as_bytes(~"rust\x00\x00\x00\x01") |bytes| {
11801180
vec::slice(bytes, 0, 8)
1181-
}) + flate::deflate_buf(io::mem_buffer_buf(buf))
1181+
}) + flate::deflate_bytes(io::mem_buffer_buf(buf))
11821182
}
11831183

11841184
// Get the encoded string for a type

branches/incoming/src/rustc/metadata/loader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ fn get_metadata_section(os: os,
202202
let cvbuf1 = ptr::offset(cvbuf, vlen);
203203
debug!("inflating %u bytes of compressed metadata",
204204
csz - vlen);
205-
do vec::raw::form_slice(cvbuf1, csz-vlen) |buf| {
206-
let inflated = flate::inflate_buf(buf);
205+
do vec::raw::form_slice(cvbuf1, csz-vlen) |bytes| {
206+
let inflated = flate::inflate_bytes(bytes);
207207
found = move Some(@(move inflated));
208208
}
209209
if found != None {

0 commit comments

Comments
 (0)