From 6a3f59bf30ab840681470382c8ca6ae2c3e4968b Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sat, 13 May 2023 14:28:19 +0800 Subject: [PATCH] ... --- src/pocketpy.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketpy.h b/src/pocketpy.h index 05988b67..c050d9c6 100644 --- a/src/pocketpy.h +++ b/src/pocketpy.h @@ -468,12 +468,12 @@ inline void init_builtins(VM* _vm) { return VAR(ss.str()); }); - _vm->bind_method<0>("str", "to_char_array", [](VM* vm, ArgsView args){ + _vm->bind_method<0>("str", "to_c_str", [](VM* vm, ArgsView args){ const Str& self = _CAST(Str&, args[0]); return VAR(self.c_str_dup()); }); - _vm->bind_func<1>("str", "from_char_array", [](VM* vm, ArgsView args){ + _vm->bind_func<1>("str", "from_c_str", [](VM* vm, ArgsView args){ char* p = CAST(char*, args[0]); return VAR(Str(p)); });