From 76c8649038bed4598c7fcac9ef87548f94013087 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Thu, 1 Apr 2010 16:42:11 +0000 Subject: Issue #8276: PyEval_CallObject() is now only available in macro form. The function declaration, which was kept for backwards compatibility reasons, is now removed (the macro was introduced in 1997!). --- Include/ceval.h | 4 ---- Misc/NEWS | 4 ++++ Python/ceval.c | 13 +------------ 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/Include/ceval.h b/Include/ceval.h index f441197..a3b3dcf 100644 --- a/Include/ceval.h +++ b/Include/ceval.h @@ -10,10 +10,6 @@ extern "C" { PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords( PyObject *, PyObject *, PyObject *); -/* DLL-level Backwards compatibility: */ -#undef PyEval_CallObject -PyAPI_FUNC(PyObject *) PyEval_CallObject(PyObject *, PyObject *); - /* Inline this */ #define PyEval_CallObject(func,arg) \ PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL) diff --git a/Misc/NEWS b/Misc/NEWS index ec2da1e..3715520 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -169,6 +169,10 @@ Build C-API ----- +- Issue #8276: PyEval_CallObject() is now only available in macro form. The + function declaration, which was kept for backwards compatibility reasons, + is now removed (the macro was introduced in 1997!). + - Issue #7992: A replacement PyCObject API, PyCapsule, has been backported from Python 3.1. diff --git a/Python/ceval.c b/Python/ceval.c index 339a351..b06de50 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3852,18 +3852,7 @@ Py_FlushLine(void) /* 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(PyObject *func, PyObject *arg) -{ - return PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL); -} -#define PyEval_CallObject(func,arg) \ - PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL) + The arg must be a tuple or NULL. The kw must be a dict or NULL. */ PyObject * PyEval_CallObjectWithKeywords(PyObject *func, PyObject *arg, PyObject *kw) -- cgit v0.12