From fb55f42d0ec7205136dad09437730a4603c0b0cd Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sat, 26 Nov 2022 15:53:07 +0000 Subject: [PATCH] Tweaked where strlen() is called --- repl/lib_standard.c | 2 +- repl/lib_timer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repl/lib_standard.c b/repl/lib_standard.c index 26debdb..52f339e 100644 --- a/repl/lib_standard.c +++ b/repl/lib_standard.c @@ -57,7 +57,7 @@ int hookStandard(Interpreter* interpreter, Literal identifier, Literal alias) { //load the dict with functions for (int i = 0; natives[i].name; i++) { - Literal name = TO_STRING_LITERAL(createRefStringLength(natives[i].name, strlen(natives[i].name))); + Literal name = TO_STRING_LITERAL(createRefString(natives[i].name)); Literal func = TO_FUNCTION_LITERAL((void*)natives[i].fn, 0); func.type = LITERAL_FUNCTION_NATIVE; diff --git a/repl/lib_timer.c b/repl/lib_timer.c index efa47ea..cd098c7 100644 --- a/repl/lib_timer.c +++ b/repl/lib_timer.c @@ -374,7 +374,7 @@ int hookTimer(Interpreter* interpreter, Literal identifier, Literal alias) { //load the dict with functions for (int i = 0; natives[i].name; i++) { - Literal name = TO_STRING_LITERAL(createRefStringLength(natives[i].name, strlen(natives[i].name))); + Literal name = TO_STRING_LITERAL(createRefString(natives[i].name)); Literal func = TO_FUNCTION_LITERAL((void*)natives[i].fn, 0); func.type = LITERAL_FUNCTION_NATIVE;