diff options
| author | Michael Bebenita <[email protected]> | 2010-08-09 06:59:46 -0700 |
|---|---|---|
| committer | Michael Bebenita <[email protected]> | 2010-08-09 06:59:46 -0700 |
| commit | 76ba8f1d84cf9e8f91233184d1b7c7192775143d (patch) | |
| tree | 6d2bedb8a580f0965e921fcb148eb8f6e49f0208 /src/rt/rust.cpp | |
| parent | Added Eclipse's .project and .cproject to .gitignore. (diff) | |
| download | rust-76ba8f1d84cf9e8f91233184d1b7c7192775143d.tar.xz rust-76ba8f1d84cf9e8f91233184d1b7c7192775143d.zip | |
Changed array_list::replace() return behavior.
Diffstat (limited to 'src/rt/rust.cpp')
| -rw-r--r-- | src/rt/rust.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp index 9cc2fe41..a7ad1732 100644 --- a/src/rt/rust.cpp +++ b/src/rt/rust.cpp @@ -53,7 +53,9 @@ rust_srv::realloc(void *p, size_t bytes) } void * val = ::realloc(p, bytes); #ifdef TRACK_ALLOCATIONS - if (allocation_list.replace(p, val) == NULL) { + if (allocation_list.replace(p, val) == false) { + printf("realloc: ptr 0x%" PRIxPTR " is not in allocation_list\n", + (uintptr_t) p); fatal("not in allocation_list", __FILE__, __LINE__); } #endif @@ -64,8 +66,8 @@ void rust_srv::free(void *p) { #ifdef TRACK_ALLOCATIONS - if (allocation_list.replace(p, NULL) == NULL) { - printf("ptr 0x%" PRIxPTR " is not in allocation_list\n", + if (allocation_list.replace(p, NULL) == false) { + printf("free: ptr 0x%" PRIxPTR " is not in allocation_list\n", (uintptr_t) p); fatal("not in allocation_list", __FILE__, __LINE__); } |