mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
2605382a79
commit
4f6d0999b7
@ -245,12 +245,6 @@ void py_shrink(int n);
|
|||||||
/// Get a temporary variable from the stack and returns the reference to it.
|
/// Get a temporary variable from the stack and returns the reference to it.
|
||||||
py_StackRef py_pushtmp();
|
py_StackRef py_pushtmp();
|
||||||
|
|
||||||
#define py_gettop() py_peek(-1)
|
|
||||||
#define py_getsecond() py_peek(-2)
|
|
||||||
#define py_settop(v) py_assign(py_peek(-1), v)
|
|
||||||
#define py_setsecond(v) py_assign(py_peek(-2), v)
|
|
||||||
#define py_duptop() py_push(py_peek(-1))
|
|
||||||
#define py_dupsecond() py_push(py_peek(-2))
|
|
||||||
/************* Modules *************/
|
/************* Modules *************/
|
||||||
py_TmpRef py_newmodule(const char* name, const char* package);
|
py_TmpRef py_newmodule(const char* name, const char* package);
|
||||||
py_TmpRef py_getmodule(const char* name);
|
py_TmpRef py_getmodule(const char* name);
|
||||||
|
@ -82,5 +82,5 @@ void py_pushnil() {
|
|||||||
py_Ref py_pushtmp() {
|
py_Ref py_pushtmp() {
|
||||||
pk_VM* vm = pk_current_vm;
|
pk_VM* vm = pk_current_vm;
|
||||||
py_newnil(vm->stack.sp++);
|
py_newnil(vm->stack.sp++);
|
||||||
return py_gettop();
|
return py_peek(-1);
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user