diff --git a/src/compile.c b/src/compile.c index ccc8eea..896c481 100644 --- a/src/compile.c +++ b/src/compile.c @@ -5,9 +5,9 @@ #include "apfl.h" #include "compile.h" - #include "bytecode.h" #include "resizable.h" +#include "strings.h" #define DEBUG_COMPILING 1 @@ -115,13 +115,12 @@ ilist_put_string(struct instruction_list *ilist, struct apfl_string *string) static bool string_move_into_new(struct compiler *compiler, struct apfl_string **out, struct apfl_string *in) { - struct apfl_string *str = apfl_gc_new_string(compiler->gc); + struct apfl_string *str = apfl_string_move_into_new_gc_string(compiler->gc, in); if (str == NULL) { compiler->error = apfl_error_simple(APFL_ERR_MALLOC_FAILED); return false; } - *str = apfl_string_move(in); *out = str; return true; }