mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
Update obj.h
This commit is contained in:
parent
527f543cf0
commit
7796369fb7
@ -93,6 +93,7 @@ struct Py_ : PyObject {
|
||||
virtual void* value() override { return &_valueT; }
|
||||
};
|
||||
|
||||
#define UNION_GET(T, obj) (((Py_<T>*)((obj).get()))->_valueT)
|
||||
//#define UNION_GET(T, obj) (((Py_<T>*)((obj).get()))->_valueT)
|
||||
#define UNION_GET(T, obj) (*static_cast<T*>((obj)->value()))
|
||||
#define UNION_NAME(obj) UNION_GET(_Str, (obj)->attribs[__name__])
|
||||
#define UNION_TP_NAME(obj) UNION_GET(_Str, (obj)->type->attribs[__name__])
|
Loading…
x
Reference in New Issue
Block a user