More deprecations in lib6, and updates to lib7

This commit is contained in:
Christoffer Lerno
2025-02-27 11:10:41 +01:00
parent 6d3c1f5d2f
commit 33b05bcfeb
69 changed files with 439 additions and 226 deletions

View File

@@ -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);

View File

@@ -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)
{