@@ -41,7 +41,7 @@ use syntax::ast;
4141use syntax:: ast_map:: { path, path_mod, path_name, path_pretty_name} ;
4242use syntax:: attr;
4343use syntax:: attr:: AttrMetaMethods ;
44- use syntax:: pkgid :: PkgId ;
44+ use syntax:: crateid :: CrateId ;
4545
4646#[ deriving( Clone , Eq ) ]
4747pub enum output_type {
@@ -444,13 +444,13 @@ pub mod write {
444444 *
445445 * So here is what we do:
446446 *
447- * - Consider the package id; every crate has one (specified with pkgid
447+ * - Consider the package id; every crate has one (specified with crate_id
448448 * attribute). If a package id isn't provided explicitly, we infer a
449449 * versionless one from the output name. The version will end up being 0.0
450450 * in this case. CNAME and CVERS are taken from this package id. For
451451 * example, github.com/mozilla/CNAME#CVERS.
452452 *
453- * - Define CMH as SHA256(pkgid ).
453+ * - Define CMH as SHA256(crateid ).
454454 *
455455 * - Define CMH8 as the first 8 characters of CMH.
456456 *
@@ -469,9 +469,9 @@ pub fn build_link_meta(sess: Session,
469469 symbol_hasher : & mut Sha256 )
470470 -> LinkMeta {
471471 // This calculates CMH as defined above
472- fn crate_hash ( symbol_hasher : & mut Sha256 , pkgid : & PkgId ) -> @str {
472+ fn crate_hash ( symbol_hasher : & mut Sha256 , crateid : & CrateId ) -> @str {
473473 symbol_hasher. reset ( ) ;
474- symbol_hasher. input_str ( pkgid . to_str ( ) ) ;
474+ symbol_hasher. input_str ( crateid . to_str ( ) ) ;
475475 truncated_hash_result ( symbol_hasher) . to_managed ( )
476476 }
477477
@@ -487,10 +487,10 @@ pub fn build_link_meta(sess: Session,
487487 Some ( s) => s,
488488 } ;
489489
490- let hash = crate_hash ( symbol_hasher, & pkgid ) ;
490+ let hash = crate_hash ( symbol_hasher, & crateid ) ;
491491
492492 LinkMeta {
493- pkgid : pkgid ,
493+ crateid : crateid ,
494494 crate_hash : hash,
495495 }
496496}
@@ -509,7 +509,7 @@ pub fn symbol_hash(tcx: ty::ctxt,
509509 // to be independent of one another in the crate.
510510
511511 symbol_hasher. reset ( ) ;
512- symbol_hasher. input_str ( link_meta. pkgid . name ) ;
512+ symbol_hasher. input_str ( link_meta. crateid . name ) ;
513513 symbol_hasher. input_str ( "-" ) ;
514514 symbol_hasher. input_str ( link_meta. crate_hash ) ;
515515 symbol_hasher. input_str ( "-" ) ;
@@ -669,7 +669,7 @@ pub fn mangle_exported_name(ccx: &CrateContext,
669669 let hash = get_symbol_hash ( ccx, t) ;
670670 return exported_name ( ccx. sess , path,
671671 hash,
672- ccx. link_meta . pkgid . version_or_default ( ) ) ;
672+ ccx. link_meta . crateid . version_or_default ( ) ) ;
673673}
674674
675675pub fn mangle_internal_name_by_type_only ( ccx : & CrateContext ,
@@ -710,9 +710,9 @@ pub fn mangle_internal_name_by_path(ccx: &CrateContext, path: path) -> ~str {
710710
711711pub fn output_lib_filename ( lm : & LinkMeta ) -> ~str {
712712 format ! ( "{}-{}-{}" ,
713- lm. pkgid . name,
713+ lm. crateid . name,
714714 lm. crate_hash. slice_chars( 0 , 8 ) ,
715- lm. pkgid . version_or_default( ) )
715+ lm. crateid . version_or_default( ) )
716716}
717717
718718pub fn get_cc_prog ( sess : Session ) -> ~str {
0 commit comments