mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
Update cffi.h
This commit is contained in:
parent
6a3f59bf30
commit
4fe1e2bec5
@ -71,6 +71,13 @@ struct PlainOldData{
|
||||
|
||||
inline void add_module_c(VM* vm){
|
||||
PyObject* mod = vm->new_module("c");
|
||||
|
||||
vm->bind_func<1>(mod, "free", [](VM* vm, ArgsView args){
|
||||
void* p = CAST(void*, args[0]);
|
||||
free(p);
|
||||
return vm->None;
|
||||
});
|
||||
|
||||
VoidP::register_class(vm, mod);
|
||||
PlainOldData::register_class(vm, mod);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user