about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-09-02 12:21:01 -0700
committerBrian Anderson <banderson@mozilla.com>2011-09-02 15:13:41 -0700
commit72c14d5a4108e91dcdce17c8ccc6f7953fde8a70 (patch)
tree099f4e7f99b10f0033784b0b0265a1dc9a298d7f /src/rt/rust_builtin.cpp
parent99ee0fca6722bc8b78032605c2f6243340f6b04e (diff)
downloadrust-72c14d5a4108e91dcdce17c8ccc6f7953fde8a70.tar.gz
rust-72c14d5a4108e91dcdce17c8ccc6f7953fde8a70.zip
Eliminate const_refcount. Issue #855
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 814822e8f1e..0ed30a8cbf6 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -90,9 +90,6 @@ leak(rust_task *task, type_desc *t, void *thing) {
 extern "C" CDECL intptr_t
 refcount(rust_task *task, type_desc *t, intptr_t *v) {
 
-    if (*v == CONST_REFCOUNT)
-        return CONST_REFCOUNT;
-
     // Passed-in value has refcount 1 too high
     // because it was ref'ed while making the call.
     return (*v) - 1;
@@ -249,9 +246,7 @@ debug_box(rust_task *task, type_desc *t, rust_box *box)
     LOG(task, stdlib, "debug_box(0x%" PRIxPTR ")", box);
     debug_tydesc_helper(task, t);
     LOG(task, stdlib, "  refcount %" PRIdPTR,
-        box->ref_count == CONST_REFCOUNT
-        ? CONST_REFCOUNT
-        : box->ref_count - 1);  // -1 because we ref'ed for this call
+        box->ref_count - 1);  // -1 because we ref'ed for this call
     for (uintptr_t i = 0; i < t->size; ++i) {
         LOG(task, stdlib, "  byte %" PRIdPTR ": 0x%" PRIx8, i, box->data[i]);
     }