mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-03 10:57:15 -04:00
Use global arena for AstNode allocations
This commit is contained in:
1 parent
49ea9ed722
commit
268491b224
11 files changed
+129
-120
No files matched your search
+1
-1
@@ -96,7 +96,7 @@ String substring(String const &s, isize lo, isize hi) {
|
||||
|
||||
char *alloc_cstring(gbAllocator a, String s) {
|
||||
char *c_str = gb_alloc_array(a, char, s.len+1);
|
||||
gb_memcopy(c_str, s.text, s.len);
|
||||
gb_memmove(c_str, s.text, s.len);
|
||||
c_str[s.len] = '\0';
|
||||
return c_str;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user