[Python-checkins] python/dist/src/Python ceval.c,2.403,2.404

mondragon at users.sourceforge.net mondragon at users.sourceforge.net
Tue Jun 22 11:37:55 EDT 2004


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28908/Python

Modified Files:
	ceval.c 
Log Message:
Less ugly #ifdefs for C profiling fix


Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.403
retrieving revision 2.404
diff -C2 -d -r2.403 -r2.404
*** ceval.c	22 Jun 2004 04:18:47 -0000	2.403
--- ceval.c	22 Jun 2004 15:37:51 -0000	2.404
***************
*** 3439,3442 ****
--- 3439,3443 ----
  }
  
+ #ifdef WITH_C_PROF
  #define BEGIN_C_TRACE \
  if (tstate->use_tracing) { \
***************
*** 3473,3476 ****
--- 3474,3481 ----
  		} \
  	}
+ #else
+ #define BEGIN_C_TRACE
+ #define END_C_TRACE
+ #endif
  
  
***************
*** 3504,3524 ****
  			PyObject *self = PyCFunction_GET_SELF(func);
  			if (flags & METH_NOARGS && na == 0) {
- #ifdef WITH_C_PROF
   				BEGIN_C_TRACE
- #endif
  				x = (*meth)(self, NULL);
- #ifdef WITH_C_PROF
  				END_C_TRACE
- #endif
  			}
  			else if (flags & METH_O && na == 1) {
  				PyObject *arg = EXT_POP(*pp_stack);
- #ifdef WITH_C_PROF
  				BEGIN_C_TRACE
- #endif
  				x = (*meth)(self, arg);
- #ifdef WITH_C_PROF
  				END_C_TRACE
- #endif
  				Py_DECREF(arg);
  			}
--- 3509,3521 ----
***************
*** 3531,3537 ****
  			PyObject *callargs;
  			callargs = load_args(pp_stack, na);
- #ifdef WITH_C_PROF
  			BEGIN_C_TRACE
- #endif
  #ifdef WITH_TSC
  			rdtscll(*pintr0);
--- 3528,3532 ----
***************
*** 3541,3547 ****
  			rdtscll(*pintr1);
  #endif
- #ifdef WITH_C_PROF
  			END_C_TRACE
- #endif
  			Py_XDECREF(callargs);
  		}
--- 3536,3540 ----




More information about the Python-checkins mailing list