[Stackless-checkins] CVS: slpdev/src/2.3/dev/Python bltinmodule.c, 1.6, 1.7 ceval.c, 1.76, 1.77 pythonrun.c, 1.14, 1.15

Christian Tismer tismer at centera.de
Mon Apr 5 19:17:38 CEST 2004


Update of /home/cvs/slpdev/src/2.3/dev/Python
In directory centera.de:/tmp/cvs-serv17563/Python

Modified Files:
	bltinmodule.c ceval.c pythonrun.c 
Log Message:
removed certain #ifdefs, which unfortunatly became necessary
after the STACKLESS_GETARG was moved to the top of every
function. I chnaged the definition for the not STACKLESS case
to a typedef, which is probably ignored and doesn't give warnings.

Index: bltinmodule.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Python/bltinmodule.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** bltinmodule.c	5 Apr 2004 14:48:41 -0000	1.6
--- bltinmodule.c	5 Apr 2004 17:17:36 -0000	1.7
***************
*** 4,10 ****
  #include "Python.h"
  
- #ifdef STACKLESS
  #include "stackless_impl.h"
- #endif
  
  #include "node.h"
--- 4,8 ----
***************
*** 459,465 ****
  builtin_eval(PyObject *self, PyObject *args)
  {
- #ifdef STACKLESS
  	STACKLESS_GETARG();
- #endif
  	PyObject *cmd, *result, *tmp = NULL;
  	PyObject *globals = Py_None, *locals = Py_None;
--- 457,461 ----
***************
*** 492,498 ****
  			return NULL;
  		}
- #ifdef STACKLESS
  		STACKLESS_PROMOTE_ALL();
- #endif
  		return PyEval_EvalCode((PyCodeObject *) cmd, globals, locals);
  	}
--- 488,492 ----
***************
*** 521,531 ****
  
  	(void)PyEval_MergeCompilerFlags(&cf);
- #ifdef STACKLESS
  	STACKLESS_PROMOTE_ALL();
- #endif
  	result = PyRun_StringFlags(str, Py_eval_input, globals, locals, &cf);
- #ifdef STACKLESS
  	STACKLESS_ASSERT();
- #endif
  	Py_XDECREF(tmp);
  	return result;
--- 515,521 ----
***************
*** 545,551 ****
  builtin_execfile(PyObject *self, PyObject *args)
  {
- #ifdef STACKLESS
  	STACKLESS_GETARG();
- #endif
  	char *filename;
  	PyObject *globals = Py_None, *locals = Py_None;
--- 535,539 ----
***************
*** 625,631 ****
  	}
  	cf.cf_flags = 0;
- #ifdef STACKLESS
  	STACKLESS_PROMOTE_ALL();
- #endif
  	if (PyEval_MergeCompilerFlags(&cf))
  		res = PyRun_FileExFlags(fp, filename, Py_file_input, globals,
--- 613,617 ----
***************
*** 634,640 ****
  		res = PyRun_FileEx(fp, filename, Py_file_input, globals,
  				   locals, 1);
- #ifdef STACKLESS
  	STACKLESS_ASSERT();
- #endif
  	return res;
  }
--- 620,624 ----

Index: ceval.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Python/ceval.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** ceval.c	5 Apr 2004 14:48:41 -0000	1.76
--- ceval.c	5 Apr 2004 17:17:36 -0000	1.77
***************
*** 2680,2686 ****
  	   PyObject **defs, int defcount, PyObject *closure)
  {
- #ifdef STACKLESS
  	STACKLESS_GETARG();
- #endif
  	register PyFrameObject *f;
  	register PyObject *retval = NULL;
--- 2680,2684 ----
***************
*** 3597,3603 ****
  PyEval_CallObjectWithKeywords(PyObject *func, PyObject *arg, PyObject *kw)
  {
- #ifdef STACKLESS
  	STACKLESS_GETARG();
- #endif
  	PyObject *result;
  
--- 3595,3599 ----
***************
*** 3618,3628 ****
  		return NULL;
  	}
- #ifdef STACKLESS
  	STACKLESS_PROMOTE_ALL();
- #endif
  	result = PyObject_Call(func, arg, kw);
- #ifdef STACKLESS
  	STACKLESS_ASSERT();
- #endif
  	Py_DECREF(arg);
  	return result;
--- 3614,3620 ----

Index: pythonrun.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Python/pythonrun.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** pythonrun.c	5 Apr 2004 14:48:41 -0000	1.14
--- pythonrun.c	5 Apr 2004 17:17:36 -0000	1.15
***************
*** 1226,1238 ****
  	     PyObject *locals, int closeit)
  {
- #ifdef STACKLESS
  	STACKLESS_GETARG();
- #endif
  	node *n = PyParser_SimpleParseFile(fp, filename, start);
  	if (closeit)
  		fclose(fp);
- #ifdef STACKLESS
  	STACKLESS_PROMOTE_ALL();
- #endif
  	return run_err_node(n, filename, globals, locals, NULL);
  }
--- 1226,1234 ----
***************
*** 1259,1272 ****
  		  PyObject *locals, int closeit, PyCompilerFlags *flags)
  {
- #ifdef STACKLESS	
  	STACKLESS_GETARG();
- #endif
  	node *n = PyParser_SimpleParseFileFlags(fp, filename, start,
  						PARSER_FLAGS(flags));
  	if (closeit)
  		fclose(fp);
- #ifdef STACKLESS	
  	STACKLESS_PROMOTE_ALL();
- #endif
  	return run_err_node(n, filename, globals, locals, flags);
  }
--- 1255,1264 ----
***************
*** 1276,1287 ****
  	     PyCompilerFlags *flags)
  {
- #ifdef STACKLESS
  	STACKLESS_GETARG();
- #endif
  	if (n == NULL)
  		return  NULL;
- #ifdef STACKLESS
  	STACKLESS_PROMOTE_ALL();
- #endif
  	return run_node(n, filename, globals, locals, flags);
  }
--- 1268,1275 ----
***************
*** 1291,1297 ****
  	 PyCompilerFlags *flags)
  {
- #ifdef STACKLESS
  	STACKLESS_GETARG();
- #endif
  	PyCodeObject *co;
  	PyObject *v;
--- 1279,1283 ----
***************
*** 1300,1310 ****
  	if (co == NULL)
  		return NULL;
- #ifdef STACKLESS
  	STACKLESS_PROMOTE_ALL();
- #endif
  	v = PyEval_EvalCode(co, globals, locals);
- #ifdef STACKLESS
  	STACKLESS_ASSERT();
- #endif
  	Py_DECREF(co);
  	return v;
--- 1286,1292 ----


_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins



More information about the Stackless-checkins mailing list