mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-24 05:20:17 +00:00
621 B
621 B
| title | icon | order |
|---|---|---|
| Call | dot | 6 |
bool pkpy_vectorcall(pkpy_vm*, int argc)
Wraps vm->vectorcall(argc). This function is used to call a function with a fixed number of arguments. The arguments are popped from the stack. The return value is pushed onto the stack.
- First push the function to call.
- Push
selfargument if it is a method call. Otherwise, callpkpy_push_null. - Push arguments from left to right.
!!!
Unlike lua, a python function always returns a value.
If the function returns void, it will push None onto the stack.
You can call pkpy_pop_top to discard the return value.
!!!