@@ -41,7 +41,7 @@ use syntax::ast;
41
41
use syntax:: ast_map:: { path, path_mod, path_name, path_pretty_name} ;
42
42
use syntax:: attr;
43
43
use syntax:: attr:: AttrMetaMethods ;
44
- use syntax:: pkgid :: PkgId ;
44
+ use syntax:: crateid :: CrateId ;
45
45
46
46
#[ deriving( Clone , Eq ) ]
47
47
pub enum output_type {
@@ -444,13 +444,13 @@ pub mod write {
444
444
*
445
445
* So here is what we do:
446
446
*
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
448
448
* attribute). If a package id isn't provided explicitly, we infer a
449
449
* versionless one from the output name. The version will end up being 0.0
450
450
* in this case. CNAME and CVERS are taken from this package id. For
451
451
* example, github.com/mozilla/CNAME#CVERS.
452
452
*
453
- * - Define CMH as SHA256(pkgid ).
453
+ * - Define CMH as SHA256(crateid ).
454
454
*
455
455
* - Define CMH8 as the first 8 characters of CMH.
456
456
*
@@ -469,9 +469,9 @@ pub fn build_link_meta(sess: Session,
469
469
symbol_hasher : & mut Sha256 )
470
470
-> LinkMeta {
471
471
// 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 {
473
473
symbol_hasher. reset ( ) ;
474
- symbol_hasher. input_str ( pkgid . to_str ( ) ) ;
474
+ symbol_hasher. input_str ( crateid . to_str ( ) ) ;
475
475
truncated_hash_result ( symbol_hasher) . to_managed ( )
476
476
}
477
477
@@ -487,10 +487,10 @@ pub fn build_link_meta(sess: Session,
487
487
Some ( s) => s,
488
488
} ;
489
489
490
- let hash = crate_hash ( symbol_hasher, & pkgid ) ;
490
+ let hash = crate_hash ( symbol_hasher, & crateid ) ;
491
491
492
492
LinkMeta {
493
- pkgid : pkgid ,
493
+ crateid : crateid ,
494
494
crate_hash : hash,
495
495
}
496
496
}
@@ -509,7 +509,7 @@ pub fn symbol_hash(tcx: ty::ctxt,
509
509
// to be independent of one another in the crate.
510
510
511
511
symbol_hasher. reset ( ) ;
512
- symbol_hasher. input_str ( link_meta. pkgid . name ) ;
512
+ symbol_hasher. input_str ( link_meta. crateid . name ) ;
513
513
symbol_hasher. input_str ( "-" ) ;
514
514
symbol_hasher. input_str ( link_meta. crate_hash ) ;
515
515
symbol_hasher. input_str ( "-" ) ;
@@ -669,7 +669,7 @@ pub fn mangle_exported_name(ccx: &CrateContext,
669
669
let hash = get_symbol_hash ( ccx, t) ;
670
670
return exported_name ( ccx. sess , path,
671
671
hash,
672
- ccx. link_meta . pkgid . version_or_default ( ) ) ;
672
+ ccx. link_meta . crateid . version_or_default ( ) ) ;
673
673
}
674
674
675
675
pub 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 {
710
710
711
711
pub fn output_lib_filename ( lm : & LinkMeta ) -> ~str {
712
712
format ! ( "{}-{}-{}" ,
713
- lm. pkgid . name,
713
+ lm. crateid . name,
714
714
lm. crate_hash. slice_chars( 0 , 8 ) ,
715
- lm. pkgid . version_or_default( ) )
715
+ lm. crateid . version_or_default( ) )
716
716
}
717
717
718
718
pub fn get_cc_prog ( sess : Session ) -> ~str {
0 commit comments