about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2011-04-21 16:44:17 -0700
committerPatrick Walton <pcwalton@mimiga.net>2011-04-21 16:44:17 -0700
commit735435bf964dcafdfc09d01ea644bbfbe725abd8 (patch)
tree0689fd29766063d7cb853c31989ba983c5a9d587 /src/rt
parent5dbf554bb3f5883a3375e21285f9591e0e118914 (diff)
downloadrust-735435bf964dcafdfc09d01ea644bbfbe725abd8.tar.gz
rust-735435bf964dcafdfc09d01ea644bbfbe725abd8.zip
stdlib: Add a pointer equality function to the standard library and a test case
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/rust_builtin.cpp5
-rw-r--r--src/rt/rustrt.def.in1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index c1aa5b59413..30e2eb3ddeb 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -468,6 +468,11 @@ rust_file_is_dir(rust_task *task, rust_str *path) {
 extern "C" CDECL FILE* rust_get_stdin() {return stdin;}
 extern "C" CDECL FILE* rust_get_stdout() {return stdout;}
 
+extern "C" CDECL int
+rust_ptr_eq(rust_task *task, type_desc *t, rust_box *a, rust_box *b) {
+    return a == b;
+}
+
 //
 // Local Variables:
 // mode: C++
diff --git a/src/rt/rustrt.def.in b/src/rt/rustrt.def.in
index 9ea6bee4262..d724dd714cf 100644
--- a/src/rt/rustrt.def.in
+++ b/src/rt/rustrt.def.in
@@ -19,6 +19,7 @@ rust_get_stdin
 rust_get_stdout
 rust_list_files
 rust_process_wait
+rust_ptr_eq
 rust_run_program
 rust_start
 size_of