This commit is contained in:
blueloveTH 2024-07-21 21:17:30 +08:00
parent 2605382a79
commit 4f6d0999b7
2 changed files with 1 additions and 7 deletions

View File

@ -245,12 +245,6 @@ void py_shrink(int n);
/// Get a temporary variable from the stack and returns the reference to it.
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 *************/
py_TmpRef py_newmodule(const char* name, const char* package);
py_TmpRef py_getmodule(const char* name);

View File

@ -82,5 +82,5 @@ void py_pushnil() {
py_Ref py_pushtmp() {
pk_VM* vm = pk_current_vm;
py_newnil(vm->stack.sp++);
return py_gettop();
return py_peek(-1);
}