diff options
| author | Michael Bebenita <[email protected]> | 2010-07-28 00:40:45 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-07-28 20:30:29 -0700 |
| commit | e327aa50931b8d081598a47dc8e085a2f52f851f (patch) | |
| tree | 497ea839aadd981e0673215ad05f9ebf5ba94aac /src/rt | |
| parent | Add modeline / file-local emacs var blocks. (diff) | |
| download | rust-e327aa50931b8d081598a47dc8e085a2f52f851f.tar.xz rust-e327aa50931b8d081598a47dc8e085a2f52f851f.zip | |
Teach task_owned and dom_owned to find their dom via consistent interface.
Diffstat (limited to 'src/rt')
| -rw-r--r-- | src/rt/rust_internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rt/rust_internal.h b/src/rt/rust_internal.h index 529fd3d7..bc5835fe 100644 --- a/src/rt/rust_internal.h +++ b/src/rt/rust_internal.h @@ -95,6 +95,9 @@ template <typename T> struct dom_owned { + rust_dom *get_dom() const { + return ((T*)this)->dom; + } void operator delete(void *ptr) { ((T *)ptr)->dom->free(ptr); } @@ -104,6 +107,9 @@ template <typename T> struct task_owned { + rust_dom *get_dom() const { + return ((T *)this)->task->dom; + } void operator delete(void *ptr) { ((T *)ptr)->task->dom->free(ptr); } |