diff --git a/include/pocketpy/objects/dict.hpp b/include/pocketpy/objects/dict.hpp index 1c51161c..6c854961 100644 --- a/include/pocketpy/objects/dict.hpp +++ b/include/pocketpy/objects/dict.hpp @@ -34,7 +34,7 @@ struct Dict : private pkpy_Dict { PyVar try_get(VM* vm, PyVar key) const { auto res = pkpy_Dict__try_get(this, vm, *reinterpret_cast<::pkpy_Var*>(&key)); if (!res) return nullptr; - return PyVar(*reinterpret_cast(&res)); + return *reinterpret_cast(res); } bool contains(VM* vm, PyVar key) const { diff --git a/include/pocketpy/objects/pyvar.h b/include/pocketpy/objects/pyvar.h index 5947c4d9..edd7495f 100644 --- a/include/pocketpy/objects/pyvar.h +++ b/include/pocketpy/objects/pyvar.h @@ -12,7 +12,8 @@ extern "C" { */ typedef struct { int type; - int _0, _1, _2; + int _0; + int64_t _1; } pkpy_Var; /**