Skip to content

Commit 025aabd

Browse files
committed
---
yaml --- r: 23959 b: refs/heads/master c: 651e63c h: refs/heads/master i: 23957: 6cdbbb7 23955: 44bcdf5 23951: c1e46cf v: v3
1 parent 4d46451 commit 025aabd

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f1f57392564a89155b404a8d326fac9d6923626b
2+
refs/heads/master: 651e63cc5c2b90204e8cd9d263da567fe2a66fbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/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+
}

trunk/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

trunk/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)