From d7ed683a7ead15583899d7f7fbfb9078139c6a80 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 30 Aug 1997 15:02:50 +0000 Subject: Inline PyObject_CallObject (Marc-Andre Lemburg). --- Include/ceval.h | 5 ++++- Python/ceval.c | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Include/ceval.h b/Include/ceval.h index 2805379..62977ba 100644 --- a/Include/ceval.h +++ b/Include/ceval.h @@ -37,10 +37,13 @@ PERFORMANCE OF THIS SOFTWARE. /* Interface to random parts in ceval.c */ -PyObject *PyEval_CallObject Py_PROTO((PyObject *, PyObject *)); PyObject *PyEval_CallObjectWithKeywords Py_PROTO((PyObject *, PyObject *, PyObject *)); +/* Inline this */ +#define PyEval_CallObject(func,arg) \ + PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL) + PyObject *PyEval_GetBuiltins Py_PROTO((void)); PyObject *PyEval_GetGlobals Py_PROTO((void)); PyObject *PyEval_GetLocals Py_PROTO((void)); diff --git a/Python/ceval.c b/Python/ceval.c index 7c1d407..4bf53e8 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2254,6 +2254,9 @@ Py_FlushLine() /* External interface to call any callable object. The arg must be a tuple or NULL. */ +#undef PyEval_CallObject +/* for backward compatibility: export this interface */ + PyObject * PyEval_CallObject(func, arg) PyObject *func; @@ -2261,6 +2264,8 @@ PyEval_CallObject(func, arg) { return PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL); } +#define PyEval_CallObject(func,arg) \ + PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL) PyObject * PyEval_CallObjectWithKeywords(func, arg, kw) -- cgit v0.12