mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
249656039a
commit
f4e9293643
@ -34,7 +34,7 @@ struct Dict : private pkpy_Dict {
|
|||||||
PyVar try_get(VM* vm, PyVar key) const {
|
PyVar try_get(VM* vm, PyVar key) const {
|
||||||
auto res = pkpy_Dict__try_get(this, vm, *reinterpret_cast<::pkpy_Var*>(&key));
|
auto res = pkpy_Dict__try_get(this, vm, *reinterpret_cast<::pkpy_Var*>(&key));
|
||||||
if (!res) return nullptr;
|
if (!res) return nullptr;
|
||||||
return *reinterpret_cast<PyVar*>(&res);
|
return PyVar(*reinterpret_cast<PyVar*>(&res));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool contains(VM* vm, PyVar key) const {
|
bool contains(VM* vm, PyVar key) const {
|
||||||
|
@ -11,12 +11,8 @@ extern "C" {
|
|||||||
* @brief A python value in pocketpy.
|
* @brief A python value in pocketpy.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
// TODO: implement
|
int type;
|
||||||
|
int _0, _1, _2;
|
||||||
union {
|
|
||||||
int type;
|
|
||||||
char buf[16];
|
|
||||||
};
|
|
||||||
} pkpy_Var;
|
} pkpy_Var;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user