int/uint parse_buf => parse_bytes (#3444)

This commit is contained in:
Erick Tryzelaar
2012-09-14 09:55:33 -07:00
parent 651e63cc5c
commit b73f801cc1
7 changed files with 43 additions and 43 deletions

View File

@@ -205,7 +205,7 @@ fn field_mutability(d: ebml::Doc) -> ast::class_mutability {
fn variant_disr_val(d: ebml::Doc) -> Option<int> {
do option::chain(ebml::maybe_get_doc(d, tag_disr_val)) |val_doc| {
int::parse_buf(ebml::doc_data(val_doc), 10u)
int::parse_bytes(ebml::doc_data(val_doc), 10u)
}
}

View File

@@ -440,12 +440,12 @@ fn parse_def_id(buf: &[u8]) -> ast::def_id {
let crate_part = vec::view(buf, 0u, colon_idx);
let def_part = vec::view(buf, colon_idx + 1u, len);
let crate_num = match uint::parse_buf(crate_part, 10u) {
let crate_num = match uint::parse_bytes(crate_part, 10u) {
Some(cn) => cn as int,
None => fail (fmt!("internal error: parse_def_id: crate number \
expected, but found %?", crate_part))
};
let def_num = match uint::parse_buf(def_part, 10u) {
let def_num = match uint::parse_bytes(def_part, 10u) {
Some(dn) => dn as int,
None => fail (fmt!("internal error: parse_def_id: id expected, but \
found %?", def_part))