aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Box.rs
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-04-21 16:44:17 -0700
committerPatrick Walton <[email protected]>2011-04-21 16:44:17 -0700
commit735435bf964dcafdfc09d01ea644bbfbe725abd8 (patch)
tree0689fd29766063d7cb853c31989ba983c5a9d587 /src/lib/Box.rs
parentrustc: Pass a type store around, which does nothing yet (diff)
downloadrust-735435bf964dcafdfc09d01ea644bbfbe725abd8.tar.xz
rust-735435bf964dcafdfc09d01ea644bbfbe725abd8.zip
stdlib: Add a pointer equality function to the standard library and a test case
Diffstat (limited to 'src/lib/Box.rs')
-rw-r--r--src/lib/Box.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/Box.rs b/src/lib/Box.rs
new file mode 100644
index 00000000..2d94c680
--- /dev/null
+++ b/src/lib/Box.rs
@@ -0,0 +1,8 @@
+export rustrt;
+
+native "rust" mod rustrt {
+ fn rust_ptr_eq[T](@T a, @T b) -> int;
+}
+
+fn ptr_eq[T](@T a, @T b) -> bool { ret rustrt.rust_ptr_eq[T](a, b) != 0; }
+