diff --git a/include/pocketpy/frame.h b/include/pocketpy/frame.h index 2b08904e..cdf7c1f2 100644 --- a/include/pocketpy/frame.h +++ b/include/pocketpy/frame.h @@ -47,8 +47,9 @@ struct ValueStack { PyVar& peek(int n){ return _sp[-n]; } PyVar peek(int n) const { return _sp[-n]; } void push(PyVar v){ *_sp++ = v; } + void push(std::nullptr_t) { memset(_sp++, 0, sizeof(PyVar)); } void pop(){ --_sp; } - PyVar popx(){ return *--_sp; } + PyVar popx(){ --_sp; return *_sp; } ArgsView view(int n){ return ArgsView(_sp-n, _sp); } void shrink(int n){ _sp -= n; } int size() const { return _sp - _begin; }