Changeset fd54fef for tests/zombies/gc_no_raii/src/gcpointers.c
- Timestamp:
- Jan 19, 2021, 8:44:29 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- dafbde8
- Parents:
- 2f47ea4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/zombies/gc_no_raii/src/gcpointers.c
r2f47ea4 rfd54fef 113 113 #endif 114 114 115 forall( otypeT) void ?{}(gcpointer(T)* this) {115 forall(T) void ?{}(gcpointer(T)* this) { 116 116 (&this->internal) {}; 117 117 } 118 118 119 forall( otypeT) void ?{}(gcpointer(T)* this, void* address) {119 forall(T) void ?{}(gcpointer(T)* this, void* address) { 120 120 (&this->internal) { address }; 121 121 } 122 122 123 forall( otypeT) void ?{}(gcpointer(T)* this, gcpointer(T) other) {123 forall(T) void ?{}(gcpointer(T)* this, gcpointer(T) other) { 124 124 (&this->internal) { other.internal }; 125 125 } 126 126 127 forall( otypeT) void ^?{}(gcpointer(T)* this) {127 forall(T) void ^?{}(gcpointer(T)* this) { 128 128 ^?{}(&this->internal); 129 129 } 130 130 131 forall( otypeT) gcpointer(T) ?=?(gcpointer(T)* this, gcpointer(T) rhs) {131 forall(T) gcpointer(T) ?=?(gcpointer(T)* this, gcpointer(T) rhs) { 132 132 this->internal = rhs.internal; 133 133 return *this; … … 136 136 // forall(otype T) T *?(gcpointer(T) this); 137 137 138 forall( otypeT) T* get(gcpointer(T)* this) {138 forall(T) T* get(gcpointer(T)* this) { 139 139 return (T*)this->internal.ptr; 140 140 } 141 141 // 142 142 // //Logical operators 143 forall( otypeT) int ?!=?(gcpointer(T) this, int zero) {143 forall(T) int ?!=?(gcpointer(T) this, int zero) { 144 144 return this.internal.ptr != 0; 145 145 }
Note: See TracChangeset
for help on using the changeset viewer.