Update pocketpy_c.cpp

This commit is contained in:
blueloveTH 2023-05-25 13:00:00 +08:00
parent e6ca624ea2
commit 313fffb269

View File

@ -625,5 +625,6 @@ void* pkpy_get_id(pkpy_vm* vm_handle, int index) {
CVM* vm = (CVM*) vm_handle; CVM* vm = (CVM*) vm_handle;
index = lua_to_cstack_index(index, vm->c_data->size()); index = lua_to_cstack_index(index, vm->c_data->size());
PyObject* o = vm->c_data->begin()[index]; PyObject* o = vm->c_data->begin()[index];
if(is_tagged(o)) return nullptr;
return (void*) o; return (void*) o;
} }