mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Remove deprecated to avoid warnings for VarString. Fix issue casting subarrays to distinct types.
This commit is contained in:
committed by
Christoffer Lerno
parent
89de0a70d2
commit
cfba19ab77
@@ -9,7 +9,7 @@ typedef Text = VarString;
|
||||
|
||||
const usz MIN_CAPACITY = 16;
|
||||
|
||||
fn VarString new_with_capacity(usz capacity, Allocator* allocator = mem::heap()) @deprecated
|
||||
fn VarString new_with_capacity(usz capacity, Allocator* allocator = mem::heap())
|
||||
{
|
||||
if (capacity < MIN_CAPACITY) capacity = MIN_CAPACITY;
|
||||
StringData* data = malloc(StringData, 1, .using = allocator, .end_padding = capacity);
|
||||
@@ -19,7 +19,7 @@ fn VarString new_with_capacity(usz capacity, Allocator* allocator = mem::heap())
|
||||
return (VarString)data;
|
||||
}
|
||||
|
||||
fn VarString new(String c) @deprecated
|
||||
fn VarString new(String c)
|
||||
{
|
||||
usz len = c.len;
|
||||
VarString str = new_with_capacity(len);
|
||||
|
||||
Reference in New Issue
Block a user