mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
More deprecations in lib6, and updates to lib7
This commit is contained in:
@@ -21,12 +21,12 @@ struct BufferedChannelImpl @private
|
||||
Type[?] buf;
|
||||
}
|
||||
|
||||
fn void! BufferedChannel.new_init(&self, usz size = 1)
|
||||
fn void! BufferedChannel.new_init(&self, usz size = 1) @deprecated("Use init(mem)")
|
||||
{
|
||||
return self.init(size, allocator::heap());
|
||||
return self.init(mem, size);
|
||||
}
|
||||
|
||||
fn void! BufferedChannel.init(&self, usz size = 1, Allocator allocator)
|
||||
fn void! BufferedChannel.init(&self, Allocator allocator, usz size = 1)
|
||||
{
|
||||
BufferedChannelImpl* channel = allocator::new_with_padding(allocator, BufferedChannelImpl, Type.sizeof * size)!;
|
||||
defer catch allocator::free(allocator, channel);
|
||||
|
||||
@@ -18,7 +18,7 @@ struct UnbufferedChannelImpl @private
|
||||
ConditionVariable read_cond;
|
||||
}
|
||||
|
||||
fn void! UnbufferedChannel.new_init(&self) => self.init(allocator::heap());
|
||||
fn void! UnbufferedChannel.new_init(&self) @deprecated("Use init") => self.init(allocator::heap());
|
||||
|
||||
fn void! UnbufferedChannel.init(&self, Allocator allocator)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user