This commit is contained in:
blueloveTH 2023-06-27 22:18:21 +08:00
parent e4bf6288ad
commit 4a3fc95a18

View File

@ -489,6 +489,9 @@ struct Int32Flags{
uint32_t value; uint32_t value;
Int32Flags(uint32_t value) : value(value) {} Int32Flags(uint32_t value) : value(value) {}
operator int32_t() const { return value; }
operator uint32_t() const { return value; }
static void _register(VM* vm, PyObject* mod, PyObject* type){ static void _register(VM* vm, PyObject* mod, PyObject* type){
vm->bind_constructor<-1>(type, [](VM* vm, ArgsView args){ vm->bind_constructor<-1>(type, [](VM* vm, ArgsView args){
vm->check_args_size(args.size(), 1+0, 1+1); vm->check_args_size(args.size(), 1+0, 1+1);