[Python-checkins] CVS: python/dist/src/Include abstract.h,2.31,2.31.2.1 ceval.h,2.41,2.41.4.1 eval.h,2.14,2.14.8.1
Guido van Rossum
gvanrossum@users.sourceforge.net
Sat, 05 May 2001 04:37:31 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.66,2.67
- Next message: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.60.2.1,2.60.2.2 classobject.c,2.127.2.1,2.127.2.2 funcobject.c,2.37,2.37.4.1 methodobject.c,2.33.8.3,2.33.8.4 object.c,2.124.4.6,2.124.4.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv7122/Include
Modified Files:
Tag: descr-branch
abstract.h ceval.h eval.h
Log Message:
Reorganization of object calling.
The call_object() function, originally in ceval.c, begins a new life
as the official API PyObject_Call(). It is also much simplified: all
it does is call the tp_call slot, or raise an exception if that's
NULL.
The subsidiary functions (call_eval_code2(), call_cfunction(),
call_instance(), and call_method()) have all been moved to the file
implementing their particular object type, renamed according to the
local convention, and added to the type's tp_call slot. Note that
call_eval_code2() became function_call(); the tp_slot for class
objects now simply points to PyInstance_New(), which already has the
correct signature.
Because of these moves, there are some more new APIs that expose
helpers in ceval.c that are now needed outside: PyEval_GetFuncName(),
PyEval_GetFuncDesc(), PyEval_EvalCodeEx() (formerly get_func_name(),
get_func_desc(), and eval_code2().
Index: abstract.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/abstract.h,v
retrieving revision 2.31
retrieving revision 2.31.2.1
diff -C2 -r2.31 -r2.31.2.1
*** abstract.h 2001/04/23 14:08:49 2.31
--- abstract.h 2001/05/05 11:37:29 2.31.2.1
***************
*** 295,298 ****
--- 295,309 ----
+
+ DL_IMPORT(PyObject *) PyObject_Call(PyObject *callable_object,
+ PyObject *args, PyObject *kw);
+
+ /*
+
+ Call a callable Python object, callable_object, with
+ arguments and keywords arguments. The 'args' argument can not be
+ NULL, but the 'kw' argument can be NULL.
+
+ */
DL_IMPORT(PyObject *) PyObject_CallObject(PyObject *callable_object,
Index: ceval.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v
retrieving revision 2.41
retrieving revision 2.41.4.1
diff -C2 -r2.41 -r2.41.4.1
*** ceval.h 2001/03/22 02:32:48 2.41
--- ceval.h 2001/05/05 11:37:29 2.41.4.1
***************
*** 39,42 ****
--- 39,45 ----
DL_IMPORT(int) Py_GetRecursionLimit(void);
+ DL_IMPORT(char *) PyEval_GetFuncName(PyObject *);
+ DL_IMPORT(char *) PyEval_GetFuncDesc(PyObject *);
+
/* Interface for threads.
Index: eval.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/eval.h,v
retrieving revision 2.14
retrieving revision 2.14.8.1
diff -C2 -r2.14 -r2.14.8.1
*** eval.h 2000/09/01 23:29:26 2.14
--- eval.h 2001/05/05 11:37:29 2.14.8.1
***************
*** 10,13 ****
--- 10,21 ----
DL_IMPORT(PyObject *) PyEval_EvalCode(PyCodeObject *, PyObject *, PyObject *);
+ DL_IMPORT(PyObject *) PyEval_EvalCodeEx(PyCodeObject *co,
+ PyObject *globals,
+ PyObject *locals,
+ PyObject **args, int argc,
+ PyObject **kwds, int kwdc,
+ PyObject **defs, int defc,
+ PyObject *closure);
+
#ifdef __cplusplus
}
- Previous message: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.66,2.67
- Next message: [Python-checkins] CVS: python/dist/src/Objects abstract.c,2.60.2.1,2.60.2.2 classobject.c,2.127.2.1,2.127.2.2 funcobject.c,2.37,2.37.4.1 methodobject.c,2.33.8.3,2.33.8.4 object.c,2.124.4.6,2.124.4.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]