mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-24 13:30:18 +00:00
578 B
578 B
| title | icon | order |
|---|---|---|
| VM | dot | 10 |
!!! Lua Style C-API cannot be mixed with Legacy C-API. !!!
VM* pkpy_new_vm()
Create a virtual machine.
void pkpy_vm_add_module(VM* vm, const char* name, const char* source)
Add a source module into a virtual machine.
void pkpy_vm_exec(VM* vm, const char* source)
Run a given source on a virtual machine.
void pkpy_delete(void* p)
Delete a pointer allocated by pkpy_xxx_xxx.
It can be VM*, REPL*, char*, etc.
!!!
If the pointer is not allocated by pkpy_xxx_xxx, the behavior is undefined.
!!!