mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Allocator uses protocols. Fix bug where it was not possible to pass a ref variable as a ref variable. Correct codegen for !anyptr.
This commit is contained in:
committed by
Christoffer Lerno
parent
54f32ed71b
commit
89d4c2cab7
@@ -40,9 +40,9 @@ fn ByteBuffer*! ByteBuffer.init_with_buffer(&self, char[] buf)
|
||||
return self;
|
||||
}
|
||||
|
||||
fn void! ByteBuffer.free(&self)
|
||||
fn void ByteBuffer.free(&self)
|
||||
{
|
||||
if (self.allocator) self.allocator.free(self.bytes)!;
|
||||
if (self.allocator) self.allocator.free(self.bytes);
|
||||
*self = {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user