From 9790a5f5a6e534c0a1afcb4856b8fa424c47ca0e Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Thu, 6 Jul 2023 01:00:23 +0800 Subject: [PATCH] ... --- include/pocketpy/cffi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pocketpy/cffi.h b/include/pocketpy/cffi.h index 09ce2794..51938496 100644 --- a/include/pocketpy/cffi.h +++ b/include/pocketpy/cffi.h @@ -82,7 +82,7 @@ struct C99Struct{ } template - C99Struct(const T& data): C99Struct(sizeof(T)){ + C99Struct(std::nullopt_t _, const T& data): C99Struct(sizeof(T)){ static_assert(std::is_pod_v); static_assert(!std::is_pointer_v); memcpy(p, &data, this->size); @@ -163,7 +163,7 @@ T to_c99_struct(VM* vm, PyObject* var){ template std::enable_if_t && !std::is_pointer_v, PyObject*> py_var(VM* vm, const T& data){ - return VAR_T(C99Struct, data); + return VAR_T(C99Struct, std::nullopt, data); } /*****************************************************************/ struct NativeProxyFuncCBase {