add two generic macros for peeking and setting in the stack
This commit is contained in:
parent
741e6998f8
commit
b8338ab92c
|
@ -803,10 +803,12 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
|
|||
#define SECOND() (stack_pointer[-2])
|
||||
#define THIRD() (stack_pointer[-3])
|
||||
#define FOURTH() (stack_pointer[-4])
|
||||
#define PEEK(n) (stack_pointer[-(n)])
|
||||
#define SET_TOP(v) (stack_pointer[-1] = (v))
|
||||
#define SET_SECOND(v) (stack_pointer[-2] = (v))
|
||||
#define SET_THIRD(v) (stack_pointer[-3] = (v))
|
||||
#define SET_FOURTH(v) (stack_pointer[-4] = (v))
|
||||
#define SET_VALUE(n, v) (stack_pointer[-(n)] = (v))
|
||||
#define BASIC_STACKADJ(n) (stack_pointer += n)
|
||||
#define BASIC_PUSH(v) (*stack_pointer++ = (v))
|
||||
#define BASIC_POP() (*--stack_pointer)
|
||||
|
|
Loading…
Reference in New Issue