mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
SF patch # 580411, move frame macros from frameobject.h into ceval.c
remove unused macros use co alias instead of f->f_code in macros
This commit is contained in:
parent
b6d29b7856
commit
a81d220625
2 changed files with 10 additions and 23 deletions
|
@ -54,26 +54,6 @@ DL_IMPORT(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *,
|
|||
|
||||
/* The rest of the interface is specific for frame objects */
|
||||
|
||||
/* Tuple access macros */
|
||||
|
||||
#ifndef Py_DEBUG
|
||||
#define GETITEM(v, i) PyTuple_GET_ITEM((PyTupleObject *)(v), (i))
|
||||
#define GETITEMNAME(v, i) \
|
||||
PyString_AS_STRING((PyStringObject *)GETITEM((v), (i)))
|
||||
#else
|
||||
#define GETITEM(v, i) PyTuple_GetItem((v), (i))
|
||||
#define GETITEMNAME(v, i) PyString_AsString(GETITEM(v, i))
|
||||
#endif
|
||||
|
||||
#define GETUSTRINGVALUE(s) ((unsigned char *)PyString_AS_STRING(s))
|
||||
|
||||
/* Code access macros */
|
||||
|
||||
#define Getconst(f, i) (GETITEM((f)->f_code->co_consts, (i)))
|
||||
#define Getname(f, i) (GETITEMNAME((f)->f_code->co_names, (i)))
|
||||
#define Getnamev(f, i) (GETITEM((f)->f_code->co_names, (i)))
|
||||
|
||||
|
||||
/* Block management functions */
|
||||
|
||||
DL_IMPORT(void) PyFrame_BlockSetup(PyFrameObject *, int, int, int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue