Mercurial > projects > dwt2
comparison java/src/java/nonstandard/WeakRef.d @ 21:9b96950f2c3c
the 'java' tree compiles on both D1-Tango and D2-Phobos
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 19 Mar 2009 20:38:55 +0100 |
parents | 6dd524f61e62 |
children |
comparison
equal
deleted
inserted
replaced
20:dccb717aa902 | 21:9b96950f2c3c |
---|---|
74 return cast(T)cast(void*)cast_ptr_; | 74 return cast(T)cast(void*)cast_ptr_; |
75 } | 75 } |
76 WeakRef dup() { | 76 WeakRef dup() { |
77 return new WeakRef(ptr()); | 77 return new WeakRef(ptr()); |
78 } | 78 } |
79 int opEquals( Object o ){ | 79 equals_t opEquals( Object o ){ |
80 if( auto other = cast( WeakRef!(T) )o ){ | 80 if( auto other = cast( WeakRef!(T) )o ){ |
81 return other.cast_ptr_ is cast_ptr_; | 81 return other.cast_ptr_ is cast_ptr_; |
82 } | 82 } |
83 return false; | 83 return false; |
84 } | 84 } |