From: Serhiy Storchaka Date: Tue, 6 Dec 2016 11:45:44 +0000 (+0200) Subject: Fixed misplaced comment. X-Git-Tag: v3.6.0rc1~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b0f75c520ee882295b0d2884469056ebf0d0568b;p=thirdparty%2FPython%2Fcpython.git Fixed misplaced comment. --- b0f75c520ee882295b0d2884469056ebf0d0568b diff --cc Include/abstract.h index 44107a8a81d4,7dbbb74b11c7..03f8dbbc4c57 --- a/Include/abstract.h +++ b/Include/abstract.h @@@ -266,98 -264,20 +266,98 @@@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx */ PyAPI_FUNC(PyObject *) PyObject_Call(PyObject *callable_object, - PyObject *args, PyObject *kw); + PyObject *args, PyObject *kwargs); + /* + 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. ++ NULL. + */ + #ifndef Py_LIMITED_API + PyAPI_FUNC(PyObject*) _PyStack_AsTuple( + PyObject **stack, + Py_ssize_t nargs); + + /* Convert keyword arguments from the (stack, kwnames) format to a Python + dictionary. + + kwnames must only contains str strings, no subclass, and all keys must + be unique. kwnames is not checked, usually these checks are done before or later + calling _PyStack_AsDict(). For example, _PyArg_ParseStack() raises an + error if a key is not a string. */ + PyAPI_FUNC(PyObject *) _PyStack_AsDict( + PyObject **values, + PyObject *kwnames); + + /* Convert (args, nargs, kwargs) into a (stack, nargs, kwnames). + + Return a new stack which should be released by PyMem_Free(), or return + args unchanged if kwargs is NULL or an empty dictionary. + + The stack uses borrowed references. + + The type of keyword keys is not checked, these checks should be done + later (ex: _PyArg_ParseStack). */ + PyAPI_FUNC(PyObject **) _PyStack_UnpackDict( + PyObject **args, + Py_ssize_t nargs, + PyObject *kwargs, + PyObject **kwnames, + PyObject *func); + + /* Call the callable object func with the "fast call" calling convention: + args is a C array for positional arguments (nargs is the number of + positional arguments), kwargs is a dictionary for keyword arguments. + + If nargs is equal to zero, args can be NULL. kwargs can be NULL. + nargs must be greater or equal to zero. + + Return the result on success. Raise an exception on return NULL on + error. */ + PyAPI_FUNC(PyObject *) _PyObject_FastCallDict(PyObject *func, + PyObject **args, Py_ssize_t nargs, + PyObject *kwargs); + + /* Call the callable object func with the "fast call" calling convention: + args is a C array for positional arguments followed by values of + keyword arguments. Keys of keyword arguments are stored as a tuple + of strings in kwnames. nargs is the number of positional parameters at + the beginning of stack. The size of kwnames gives the number of keyword + values in the stack after positional arguments. + + kwnames must only contains str strings, no subclass, and all keys must + be unique. + + If nargs is equal to zero and there is no keyword argument (kwnames is + NULL or its size is zero), args can be NULL. + + Return the result on success. Raise an exception and return NULL on + error. */ + PyAPI_FUNC(PyObject *) _PyObject_FastCallKeywords + (PyObject *func, + PyObject **args, + Py_ssize_t nargs, + PyObject *kwnames); + +#define _PyObject_FastCall(func, args, nargs) \ + _PyObject_FastCallDict((func), (args), (nargs), NULL) + +#define _PyObject_CallNoArg(func) \ + _PyObject_FastCall((func), NULL, 0) + +#define _PyObject_CallArg1(func, arg) \ + _PyObject_FastCall((func), &(arg), 1) + + PyAPI_FUNC(PyObject *) _PyObject_Call_Prepend(PyObject *func, + PyObject *obj, PyObject *args, + PyObject *kwargs); + PyAPI_FUNC(PyObject *) _Py_CheckFunctionResult(PyObject *func, PyObject *result, const char *where); -#endif +#endif /* Py_LIMITED_API */ - /* - Call a callable Python object, callable_object, with - arguments and keywords arguments. The 'args' argument can not be - NULL. - */ - PyAPI_FUNC(PyObject *) PyObject_CallObject(PyObject *callable_object, PyObject *args);