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

Delta Between Two Patch Sets: Python/sysmodule.c

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 | « Python/pythonrun.c ('k') | no next file » | 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 1
2 /* System module */ 2 /* System module */
3 3
4 /* 4 /*
5 Various bits of information used by the interpreter are collected in 5 Various bits of information used by the interpreter are collected in
6 module 'sys'. 6 module 'sys'.
7 Function member: 7 Function member:
8 - exit(sts): raise SystemExit 8 - exit(sts): raise SystemExit
9 Data members: 9 Data members:
10 - stdin, stdout, stderr: standard file objects 10 - stdin, stdout, stderr: standard file objects
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 if (PyFrame_FastToLocalsWithError(frame) < 0) { 374 if (PyFrame_FastToLocalsWithError(frame) < 0) {
375 return NULL; 375 return NULL;
376 } 376 }
377 377
378 stack[0] = (PyObject *)frame; 378 stack[0] = (PyObject *)frame;
379 stack[1] = whatstrings[what]; 379 stack[1] = whatstrings[what];
380 stack[2] = (arg != NULL) ? arg : Py_None; 380 stack[2] = (arg != NULL) ? arg : Py_None;
381 381
382 /* call the Python-level function */ 382 /* call the Python-level function */
383 result = _PyObject_FastCall(callback, stack, 3, NULL); 383 result = _PyObject_FastCall(callback, stack, 3);
384 384
385 PyFrame_LocalsToFast(frame, 1); 385 PyFrame_LocalsToFast(frame, 1);
386 if (result == NULL) { 386 if (result == NULL) {
387 PyTraceBack_Here(frame); 387 PyTraceBack_Here(frame);
388 } 388 }
389 389
390 return result; 390 return result;
391 } 391 }
392 392
393 static int 393 static int
(...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
2115 PyObject *writer = NULL, *result = NULL; 2115 PyObject *writer = NULL, *result = NULL;
2116 int err; 2116 int err;
2117 2117
2118 if (file == NULL) 2118 if (file == NULL)
2119 return -1; 2119 return -1;
2120 2120
2121 writer = _PyObject_GetAttrId(file, &PyId_write); 2121 writer = _PyObject_GetAttrId(file, &PyId_write);
2122 if (writer == NULL) 2122 if (writer == NULL)
2123 goto error; 2123 goto error;
2124 2124
2125 result = _PyObject_FastCall(writer, &unicode, 1, NULL); 2125 result = _PyObject_CallArg1(writer, unicode);
2126 if (result == NULL) { 2126 if (result == NULL) {
2127 goto error; 2127 goto error;
2128 } else { 2128 } else {
2129 err = 0; 2129 err = 0;
2130 goto finally; 2130 goto finally;
2131 } 2131 }
2132 2132
2133 error: 2133 error:
2134 err = -1; 2134 err = -1;
2135 finally: 2135 finally:
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
2261 2261
2262 void 2262 void
2263 PySys_FormatStderr(const char *format, ...) 2263 PySys_FormatStderr(const char *format, ...)
2264 { 2264 {
2265 va_list va; 2265 va_list va;
2266 2266
2267 va_start(va, format); 2267 va_start(va, format);
2268 sys_format(&PyId_stderr, stderr, format, va); 2268 sys_format(&PyId_stderr, stderr, format, va);
2269 va_end(va); 2269 va_end(va);
2270 } 2270 }
LEFTRIGHT

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