stdlib: Add a pointer equality function to the standard library and a test case
This commit is contained in:
parent
5dbf554bb3
commit
735435bf96
5 changed files with 27 additions and 0 deletions
8
src/lib/Box.rs
Normal file
8
src/lib/Box.rs
Normal file
|
|
@ -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; }
|
||||
|
||||
|
|
@ -69,6 +69,7 @@ mod sha1;
|
|||
mod ebml;
|
||||
mod UFind;
|
||||
mod ExtFmt;
|
||||
mod Box;
|
||||
|
||||
// Local Variables:
|
||||
// mode: rust;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue