File tree Expand file tree Collapse file tree 3 files changed +35
-2
lines changed Expand file tree Collapse file tree 3 files changed +35
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
14
14
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
15
15
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
16
16
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17
- refs/heads/auto: d12d25534b01632f7b19fae85854032ebb1b319c
17
+ refs/heads/auto: c7522417d48c03a110fa8839428424d6dbae1223
18
18
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
19
19
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
Original file line number Diff line number Diff line change @@ -600,11 +600,18 @@ pub mod writer {
600
600
use core::vec;
601
601
602
602
// ebml writing
603
+ #[cfg(stage0)]
603
604
pub struct Encoder {
604
605
writer: @io::Writer,
605
606
priv mut size_positions: ~[uint],
606
607
}
607
608
609
+ #[cfg(not(stage0))]
610
+ pub struct Encoder {
611
+ writer: @io::Writer,
612
+ priv size_positions: ~[uint],
613
+ }
614
+
608
615
fn write_sized_vuint(w: @io::Writer, n: uint, size: uint) {
609
616
match size {
610
617
1u => w.write(&[0x80u8 | (n as u8)]),
@@ -625,9 +632,22 @@ pub mod writer {
625
632
fail!(fmt!(" vint to write too big: %?", n));
626
633
}
627
634
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))]
628
645
pub fn Encoder(w: @io::Writer) -> Encoder {
629
646
let size_positions: ~[uint] = ~[];
630
- Encoder { writer: w, mut size_positions: size_positions }
647
+ Encoder {
648
+ writer: w,
649
+ size_positions: size_positions
650
+ }
631
651
}
632
652
633
653
// FIXME (#2741): Provide a function to write the standard ebml header.
Original file line number Diff line number Diff line change @@ -220,11 +220,18 @@ impl serialize::Encoder for Encoder {
220
220
}
221
221
}
222
222
223
+ #[ cfg( stage0) ]
223
224
pub struct PrettyEncoder {
224
225
priv wr: @io:: Writer ,
225
226
priv mut indent : uint ,
226
227
}
227
228
229
+ #[ cfg( not( stage0) ) ]
230
+ pub struct PrettyEncoder {
231
+ priv wr: @io:: Writer ,
232
+ priv indent : uint ,
233
+ }
234
+
228
235
pub fn PrettyEncoder ( wr : @io:: Writer ) -> PrettyEncoder {
229
236
PrettyEncoder {
230
237
wr : wr,
@@ -838,10 +845,16 @@ pub fn from_str(s: &str) -> Result<Json, Error> {
838
845
}
839
846
}
840
847
848
+ #[ cfg( stage0) ]
841
849
pub struct Decoder {
842
850
priv mut stack : ~[ Json ] ,
843
851
}
844
852
853
+ #[ cfg( not( stage0) ) ]
854
+ pub struct Decoder {
855
+ priv stack : ~[ Json ] ,
856
+ }
857
+
845
858
pub fn Decoder ( json : Json ) -> Decoder {
846
859
Decoder {
847
860
stack : ~[ json]
You can’t perform that action at this time.
0 commit comments