Skip to content

Commit 6d94b39

Browse files
committed
---
yaml --- r: 58234 b: refs/heads/auto c: c752241 h: refs/heads/master v: v3
1 parent 9b6c862 commit 6d94b39

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: d12d25534b01632f7b19fae85854032ebb1b319c
17+
refs/heads/auto: c7522417d48c03a110fa8839428424d6dbae1223
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libstd/ebml.rs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,11 +600,18 @@ pub mod writer {
600600
use core::vec;
601601
602602
// ebml writing
603+
#[cfg(stage0)]
603604
pub struct Encoder {
604605
writer: @io::Writer,
605606
priv mut size_positions: ~[uint],
606607
}
607608
609+
#[cfg(not(stage0))]
610+
pub struct Encoder {
611+
writer: @io::Writer,
612+
priv size_positions: ~[uint],
613+
}
614+
608615
fn write_sized_vuint(w: @io::Writer, n: uint, size: uint) {
609616
match size {
610617
1u => w.write(&[0x80u8 | (n as u8)]),
@@ -625,9 +632,22 @@ pub mod writer {
625632
fail!(fmt!("vint to write too big: %?", n));
626633
}
627634
635+
#[cfg(stage0)]
636+
pub fn Encoder(w: @io::Writer) -> Encoder {
637+
let size_positions: ~[uint] = ~[];
638+
Encoder {
639+
writer: w,
640+
mut size_positions: size_positions
641+
}
642+
}
643+
644+
#[cfg(not(stage0))]
628645
pub fn Encoder(w: @io::Writer) -> Encoder {
629646
let size_positions: ~[uint] = ~[];
630-
Encoder { writer: w, mut size_positions: size_positions }
647+
Encoder {
648+
writer: w,
649+
size_positions: size_positions
650+
}
631651
}
632652
633653
// FIXME (#2741): Provide a function to write the standard ebml header.

branches/auto/src/libstd/json.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,18 @@ impl serialize::Encoder for Encoder {
220220
}
221221
}
222222

223+
#[cfg(stage0)]
223224
pub struct PrettyEncoder {
224225
priv wr: @io::Writer,
225226
priv mut indent: uint,
226227
}
227228

229+
#[cfg(not(stage0))]
230+
pub struct PrettyEncoder {
231+
priv wr: @io::Writer,
232+
priv indent: uint,
233+
}
234+
228235
pub fn PrettyEncoder(wr: @io::Writer) -> PrettyEncoder {
229236
PrettyEncoder {
230237
wr: wr,
@@ -838,10 +845,16 @@ pub fn from_str(s: &str) -> Result<Json, Error> {
838845
}
839846
}
840847

848+
#[cfg(stage0)]
841849
pub struct Decoder {
842850
priv mut stack: ~[Json],
843851
}
844852

853+
#[cfg(not(stage0))]
854+
pub struct Decoder {
855+
priv stack: ~[Json],
856+
}
857+
845858
pub fn Decoder(json: Json) -> Decoder {
846859
Decoder {
847860
stack: ~[json]

0 commit comments

Comments
 (0)