Update obj.h

This commit is contained in:
blueloveTH 2023-02-26 19:30:07 +08:00
parent c274b812b2
commit c89a38fe9d

View File

@ -149,7 +149,11 @@ inline bool is_float(const PyVar& obj) noexcept {
} }
#define PY_CLASS(mod, name) \ #define PY_CLASS(mod, name) \
inline static Type _type(VM* vm) { return OBJ_GET(Type, vm->_modules[#mod]->attr(#name)); } \ inline static Type _type(VM* vm) { \
static StrName __x0(#mod); \
static StrName __x1(#name); \
return OBJ_GET(Type, vm->_modules[__x0]->attr(__x1)); \
} \
inline static const char* _mod() { return #mod; } \ inline static const char* _mod() { return #mod; } \
inline static const char* _name() { return #name; } inline static const char* _name() { return #name; }