about summary refs log tree commit diff
path: root/src/lib
diff options
context:
space:
mode:
authorRoy Frostig <rfrostig@mozilla.com>2010-09-06 23:24:01 -0700
committerRoy Frostig <rfrostig@mozilla.com>2010-09-06 23:24:01 -0700
commitcf62b54028ef949298fc38a815f5f0a3e1666261 (patch)
tree70eb2b82b0395e6bbebb8c83ff4c2f988c1a7d4b /src/lib
parent974092c5265ac6ed500bdf277412461f092fda96 (diff)
Add a little pointer-cast helper to dbg.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dbg.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/dbg.rs b/src/lib/dbg.rs
index 11c0086cfde..0ea8bd08a9b 100644
--- a/src/lib/dbg.rs
+++ b/src/lib/dbg.rs
@@ -14,6 +14,7 @@ native "rust" mod rustrt {
   fn debug_tag[T](&T x);
   fn debug_obj[T](&T x, uint nmethods, uint nbytes);
   fn debug_fn[T](&T x);
+  fn debug_ptrcast[T, U](@T x) -> @U;
 }
 
 fn debug_vec[T](vec[T] v) {
@@ -52,3 +53,7 @@ fn debug_obj[T](&T x, uint nmethods, uint nbytes) {
 fn debug_fn[T](&T x) {
   rustrt.debug_fn[T](x);
 }
+
+fn ptr_cast[T, U](@T x) -> @U {
+  ret rustrt.debug_ptrcast[T, U](x);
+}