[Python-checkins] CVS: python/dist/src/Include compile.h,2.35,2.36

Jeremy Hylton jhylton@users.sourceforge.net
Thu, 13 Dec 2001 11:47:05 -0800


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

Modified Files:
	compile.h 
Log Message:
Add helper macro to get the number of free variables for a PyCodeObject.


Index: compile.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/compile.h,v
retrieving revision 2.35
retrieving revision 2.36
diff -C2 -d -r2.35 -r2.36
*** compile.h	2001/08/10 21:38:04	2.35
--- compile.h	2001/12/13 19:47:02	2.36
***************
*** 47,50 ****
--- 47,51 ----
  
  #define PyCode_Check(op) ((op)->ob_type == &PyCode_Type)
+ #define PyCode_GetNumFree(op) (PyTuple_GET_SIZE((op)->co_freevars))
  
  #define CO_MAXBLOCKS 20 /* Max static block nesting within a function */