File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -662,7 +662,7 @@ fn encode_hash(ebml_w: ebml::writer, hash: str) {
662
662
ebml:: end_tag ( ebml_w) ;
663
663
}
664
664
665
- fn encode_metadata ( cx : @crate_ctxt , crate : @crate ) -> str {
665
+ fn encode_metadata ( cx : @crate_ctxt , crate : @crate ) -> [ u8 ] {
666
666
667
667
let abbrevs = ty:: new_ty_hash ( ) ;
668
668
let ecx = @{ ccx: cx, type_abbrevs: abbrevs} ;
@@ -695,7 +695,7 @@ fn encode_metadata(cx: @crate_ctxt, crate: @crate) -> str {
695
695
// Pad this, since something (LLVM, presumably) is cutting off the
696
696
// remaining % 4 bytes.
697
697
buf_w. write ( [ 0u8 , 0u8 , 0u8 , 0u8 ] ) ;
698
- io:: mem_buffer_str ( buf)
698
+ io:: mem_buffer_buf ( buf)
699
699
}
700
700
701
701
// Get the encoded string for a type
Original file line number Diff line number Diff line change @@ -5419,7 +5419,7 @@ fn fill_crate_map(ccx: @crate_ctxt, map: ValueRef) {
5419
5419
5420
5420
fn write_metadata ( cx : @crate_ctxt , crate : @ast:: crate ) {
5421
5421
if !cx. sess . building_library { ret; }
5422
- let llmeta = C_postr ( metadata:: encoder:: encode_metadata ( cx, crate ) ) ;
5422
+ let llmeta = C_bytes ( metadata:: encoder:: encode_metadata ( cx, crate ) ) ;
5423
5423
let llconst = trans_common:: C_struct ( [ llmeta] ) ;
5424
5424
let llglobal =
5425
5425
str:: as_buf ( "rust_metadata" ,
You can’t perform that action at this time.
0 commit comments