From f83ddde824f20d6a2d211000256057691f2a0297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Wed, 11 Dec 2013 16:30:50 +0100 Subject: [PATCH] Update to the last Rust. This renames lib.rs to nalgebra.rs so that the generated *.so has the right name. --- Makefile | 8 ++++---- src/{lib.rs => nalgebra.rs} | 0 src/structs/mat_macros.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/{lib.rs => nalgebra.rs} (100%) diff --git a/Makefile b/Makefile index b778ea53..af5b2908 100644 --- a/Makefile +++ b/Makefile @@ -3,20 +3,20 @@ nalgebra_lib_path=lib nalgebra_doc_path=doc all: mkdir -p $(nalgebra_lib_path) - rustc src/lib.rs --out-dir $(nalgebra_lib_path) --opt-level 3 + rustc src/nalgebra.rs --out-dir $(nalgebra_lib_path) --opt-level 3 test: mkdir -p $(nalgebra_lib_path) - rustc --test src/lib.rs --opt-level 3 -o test~ && ./test~ + rustc --test src/nalgebra.rs --opt-level 3 -o test~ && ./test~ rm test~ bench: - rustc --test src/lib.rs --opt-level 3 -o bench~ && ./bench~ --bench + rustc --test src/nalgebra.rs --opt-level 3 -o bench~ && ./bench~ --bench rm bench~ doc: mkdir -p $(nalgebra_doc_path) - rustdoc src/lib.rs + rustdoc src/nalgebra.rs distcheck: rm -rf $(tmp) diff --git a/src/lib.rs b/src/nalgebra.rs similarity index 100% rename from src/lib.rs rename to src/nalgebra.rs diff --git a/src/structs/mat_macros.rs b/src/structs/mat_macros.rs index e5744af5..61b745af 100644 --- a/src/structs/mat_macros.rs +++ b/src/structs/mat_macros.rs @@ -18,13 +18,13 @@ macro_rules! at_fast_impl( ($t: ident, $dim: expr) => ( impl $t { #[inline] - unsafe fn at_fast(&self, (i, j): (uint, uint)) -> N { + pub unsafe fn at_fast(&self, (i, j): (uint, uint)) -> N { (*cast::transmute::<&$t, &[N, ..$dim * $dim]>(self) .unsafe_ref(i + j * $dim)).clone() } #[inline] - unsafe fn set_fast(&mut self, (i, j): (uint, uint), val: N) { + pub unsafe fn set_fast(&mut self, (i, j): (uint, uint), val: N) { (*cast::transmute::<&mut $t, &mut [N, ..$dim * $dim]>(self) .unsafe_mut_ref(i + j * $dim)) = val }