From e765e9f9bdaa5ba8b511cd6a37710dfef5f7180e Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sat, 15 Jun 2024 23:54:10 +0800 Subject: [PATCH] fix msvc --- include/pocketpy/common/str.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/pocketpy/common/str.h b/include/pocketpy/common/str.h index ece9a51b..ac75d29c 100644 --- a/include/pocketpy/common/str.h +++ b/include/pocketpy/common/str.h @@ -33,7 +33,10 @@ PK_INLINE const char* pkpy_Str__data(const pkpy_Str* self){ } PK_INLINE c11_string pkpy_Str__sv(const pkpy_Str* self){ - return (c11_string){pkpy_Str__data(self), self->size}; + c11_string retval; + retval.data = pkpy_Str__data(self); + retval.size = self->size; + return retval; } void pkpy_Str__ctor(pkpy_Str* self, const char* data);