fix a bug

This commit is contained in:
blueloveTH 2023-05-12 21:27:20 +08:00
parent 7ace02a039
commit 1649a4e822

View File

@ -13,7 +13,7 @@ namespace pkpy {
} \ } \
static void _check_type(VM* vm, PyObject* val){ \ static void _check_type(VM* vm, PyObject* val){ \
if(!vm->isinstance(val, T::_type(vm))){ \ if(!vm->isinstance(val, T::_type(vm))){ \
vm->TypeError("expected '" #mod "." #name "', got " + OBJ_NAME(val).escape()); \ vm->TypeError("expected '" #mod "." #name "', got " + OBJ_NAME(vm->_t(val)).escape()); \
} \ } \
} \ } \
static PyObject* register_class(VM* vm, PyObject* mod) { \ static PyObject* register_class(VM* vm, PyObject* mod) { \