Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(168397)

Delta Between Two Patch Sets: Include/abstract.h

Issue 27809: _PyObject_FastCall(): add support for keyword arguments
Left Patch Set: Created 2 years, 11 months ago
Right Patch Set: Created 2 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Modules/_elementtree.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 #ifndef Py_ABSTRACTOBJECT_H 1 #ifndef Py_ABSTRACTOBJECT_H
2 #define Py_ABSTRACTOBJECT_H 2 #define Py_ABSTRACTOBJECT_H
3 #ifdef __cplusplus 3 #ifdef __cplusplus
4 extern "C" { 4 extern "C" {
5 #endif 5 #endif
6 6
7 #ifdef PY_SSIZE_T_CLEAN 7 #ifdef PY_SSIZE_T_CLEAN
8 #define PyObject_CallFunction _PyObject_CallFunction_SizeT 8 #define PyObject_CallFunction _PyObject_CallFunction_SizeT
9 #define PyObject_CallMethod _PyObject_CallMethod_SizeT 9 #define PyObject_CallMethod _PyObject_CallMethod_SizeT
10 #define _PyObject_CallMethodId _PyObject_CallMethodId_SizeT 10 #define _PyObject_CallMethodId _PyObject_CallMethodId_SizeT
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 /* Call the callable object func with the "fast call" calling convention: 273 /* Call the callable object func with the "fast call" calling convention:
274 args is a C array for positional parameters (nargs is the number of 274 args is a C array for positional parameters (nargs is the number of
275 positional paramater), kwargs is a dictionary for keyword parameters. 275 positional paramater), kwargs is a dictionary for keyword parameters.
276 276
277 If nargs is equal to zero, args can be NULL. kwargs can be NULL. 277 If nargs is equal to zero, args can be NULL. kwargs can be NULL.
278 nargs must be greater or equal to zero. 278 nargs must be greater or equal to zero.
279 279
280 Return the result on success. Raise an exception on return NULL on 280 Return the result on success. Raise an exception on return NULL on
281 error. */ 281 error. */
282 PyAPI_FUNC(PyObject *) _PyObject_FastCall(PyObject *func, 282 PyAPI_FUNC(PyObject *) _PyObject_FastCallDict(PyObject *func,
283 PyObject **args, int nargs, 283 PyObject **args, int nargs,
284 PyObject *kwargs); 284 PyObject *kwargs);
285
286 #define _PyObject_FastCall(func, args, nargs) \
287 _PyObject_FastCallDict((func), (args), (nargs), NULL)
288
289 #define _PyObject_CallNoArg(func) \
290 _PyObject_FastCall((func), NULL, 0)
291
292 #define _PyObject_CallArg1(func, arg) \
293 _PyObject_FastCall((func), &(arg), 1)
285 294
286 PyAPI_FUNC(PyObject *) _Py_CheckFunctionResult(PyObject *func, 295 PyAPI_FUNC(PyObject *) _Py_CheckFunctionResult(PyObject *func,
287 PyObject *result, 296 PyObject *result,
288 const char *where); 297 const char *where);
289 #endif /* Py_LIMITED_API */ 298 #endif /* Py_LIMITED_API */
290 299
291 /* 300 /*
292 Call a callable Python object, callable_object, with 301 Call a callable Python object, callable_object, with
293 arguments and keywords arguments. The 'args' argument can not be 302 arguments and keywords arguments. The 'args' argument can not be
294 NULL, but the 'kw' argument can be NULL. 303 NULL.
295 */ 304 */
296 305
297 PyAPI_FUNC(PyObject *) PyObject_CallObject(PyObject *callable_object, 306 PyAPI_FUNC(PyObject *) PyObject_CallObject(PyObject *callable_object,
298 PyObject *args); 307 PyObject *args);
299 308
300 /* 309 /*
301 Call a callable Python object, callable_object, with 310 Call a callable Python object, callable_object, with
302 arguments given by the tuple, args. If no arguments are 311 arguments given by the tuple, args. If no arguments are
303 needed, then args may be NULL. Returns the result of the 312 needed, then args may be NULL. Returns the result of the
304 call on success, or NULL on failure. This is the equivalent 313 call on success, or NULL on failure. This is the equivalent
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 PyAPI_FUNC(void) _Py_add_one_to_index_F(int nd, Py_ssize_t *index, 1301 PyAPI_FUNC(void) _Py_add_one_to_index_F(int nd, Py_ssize_t *index,
1293 const Py_ssize_t *shape); 1302 const Py_ssize_t *shape);
1294 PyAPI_FUNC(void) _Py_add_one_to_index_C(int nd, Py_ssize_t *index, 1303 PyAPI_FUNC(void) _Py_add_one_to_index_C(int nd, Py_ssize_t *index,
1295 const Py_ssize_t *shape); 1304 const Py_ssize_t *shape);
1296 1305
1297 1306
1298 #ifdef __cplusplus 1307 #ifdef __cplusplus
1299 } 1308 }
1300 #endif 1309 #endif
1301 #endif /* Py_ABSTRACTOBJECT_H */ 1310 #endif /* Py_ABSTRACTOBJECT_H */
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+