Files
c3c/test/test_suite/macros/ref_macro_method.c3
Christoffer Lerno c40198b016 - new_* functions in general moved to version without new_ prefix.
- `string::new_from_*` changed to `string::from_*`.
- `String.to_utf16_copy` and related changed to `String.to_utf16`.
- `String.to_utf16_tcopy` and related changed to `String.to_temp_utf16`
- `mem::temp_new` changed to `mem::tnew`.
- `mem::temp_alloc` and related changed to `mem::talloc`.
- `mem::temp_new_array` changed to `mem::temp_array`.
2025-03-03 00:32:20 +01:00

26 lines
339 B
Plaintext

import std::io;
struct MyStruct
{
DString* dyn;
}
fn void main()
{
@pool()
{
usz values_len = 10;
MyStruct ms = {
.dyn = mem::temp_array(DString, values_len).ptr,
};
for (usz i; i < values_len; ++i)
{
ms.dyn[i].tinit();
}
ms.dyn[0].append_chars("sad");
ms.dyn[0].append("sad");
};
}