[Python-checkins] python/dist/src/Python ceval.c,2.315,2.316

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Sat, 13 Jul 2002 17:27:28 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv28419/Python

Modified Files:
	ceval.c 
Log Message:
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


Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.315
retrieving revision 2.316
diff -C2 -d -r2.315 -r2.316
*** ceval.c	11 Jul 2002 16:56:38 -0000	2.315
--- ceval.c	14 Jul 2002 00:27:26 -0000	2.316
***************
*** 522,530 ****
  #endif
  
  /* Code access macros */
  
! #define GETCONST(i)	Getconst(f, i)
! #define GETNAME(i)	Getname(f, i)
! #define GETNAMEV(i)	Getnamev(f, i)
  #define INSTR_OFFSET()	(next_instr - first_instr)
  #define NEXTOP()	(*next_instr++)
--- 522,537 ----
  #endif
  
+ /* Tuple access macros */
+ 
+ #ifndef Py_DEBUG
+ #define GETITEM(v, i) PyTuple_GET_ITEM((PyTupleObject *)(v), (i))
+ #else
+ #define GETITEM(v, i) PyTuple_GetItem((v), (i))
+ #endif
+ 
  /* Code access macros */
  
! #define GETCONST(i)	(GETITEM(co->co_consts, (i)))
! #define GETNAMEV(i)	(GETITEM(co->co_names, (i)))
  #define INSTR_OFFSET()	(next_instr - first_instr)
  #define NEXTOP()	(*next_instr++)