diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-10-02 11:23:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-02 11:23:26 +0200 |
| commit | 1287e8c7349162e60e49234c36b952d14bc93a91 (patch) | |
| tree | 7135ab9ba273446bbb19b4435f4a5e329fdc0fee | |
| parent | 81fe93127d5b538dd44e80c7e38de6d8693f8557 (diff) | |
| parent | 7a6ac3ea92557c81639e8153ef030e05b1ee1a04 (diff) | |
Merge pull request #2839 from Tetralux/aprintf-ally
[fmt] Add allocator parameter to `fmt.aprintf`
| -rw-r--r-- | core/fmt/fmt.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin index c2240c275..1f52fdea9 100644 --- a/core/fmt/fmt.odin +++ b/core/fmt/fmt.odin @@ -152,9 +152,9 @@ aprintln :: proc(args: ..any, sep := " ") -> string { // // Returns: A formatted string. The returned string must be freed accordingly. // -aprintf :: proc(fmt: string, args: ..any) -> string { +aprintf :: proc(fmt: string, args: ..any, allocator := context.allocator) -> string { str: strings.Builder - strings.builder_init(&str) + strings.builder_init(&str, allocator) sbprintf(&str, fmt, ..args) return strings.to_string(str) } |