about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
authorLenny222 <github@kudling.de>2012-01-03 19:08:13 +0100
committerMarijn Haverbeke <marijnh@gmail.com>2012-01-04 09:33:07 +0100
commitd1ffe5034b341a9a522c01705cafdb19bac9cedb (patch)
tree3f9a1b4110b5010e7c6e8d82d38e642831be989f /src/comp
parentdd284eb396d802646106bdb15f474ebc10a9dfbb (diff)
downloadrust-d1ffe5034b341a9a522c01705cafdb19bac9cedb.tar.gz
rust-d1ffe5034b341a9a522c01705cafdb19bac9cedb.zip
"str": rename "str_from_cstr" to "from_cstr" (analogous to the other "from_*")
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/back/link.rs2
-rw-r--r--src/comp/metadata/creader.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/back/link.rs b/src/comp/back/link.rs
index 86974f3f3be..8950618c2e6 100644
--- a/src/comp/back/link.rs
+++ b/src/comp/back/link.rs
@@ -34,7 +34,7 @@ fn llvm_err(sess: session::session, msg: str) unsafe {
     let buf = llvm::LLVMRustGetLastError();
     if buf == ptr::null() {
         sess.fatal(msg);
-    } else { sess.fatal(msg + ": " + str::str_from_cstr(buf)); }
+    } else { sess.fatal(msg + ": " + str::from_cstr(buf)); }
 }
 
 fn load_intrinsics_bc(sess: session::session) -> option::t<ModuleRef> {
diff --git a/src/comp/metadata/creader.rs b/src/comp/metadata/creader.rs
index 2536e2efcb5..21ead604d31 100644
--- a/src/comp/metadata/creader.rs
+++ b/src/comp/metadata/creader.rs
@@ -216,7 +216,7 @@ fn get_metadata_section(sess: session::session,
     let si = mk_section_iter(of.llof);
     while llvm::LLVMIsSectionIteratorAtEnd(of.llof, si.llsi) == False {
         let name_buf = llvm::LLVMGetSectionName(si.llsi);
-        let name = unsafe { str::str_from_cstr(name_buf) };
+        let name = unsafe { str::from_cstr(name_buf) };
         if str::eq(name, sess.get_targ_cfg().target_strs.meta_sect_name) {
             let cbuf = llvm::LLVMGetSectionContents(si.llsi);
             let csz = llvm::LLVMGetSectionSize(si.llsi);