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

Side by Side Diff: Modules/_sre.c

Issue 27809: _PyObject_FastCall(): add support for keyword arguments
Patch Set: Created 3 years, 3 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:
View unified diff | Download patch
« no previous file with comments | « Modules/_pickle.c ('k') | Objects/abstract.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Secret Labs' Regular Expression Engine 2 * Secret Labs' Regular Expression Engine
3 * 3 *
4 * regular expression matching engine 4 * regular expression matching engine
5 * 5 *
6 * partial history: 6 * partial history:
7 * 1999-10-24 fl created (based on existing template matcher code) 7 * 1999-10-24 fl created (based on existing template matcher code)
8 * 2000-03-06 fl first alpha, sort of 8 * 2000-03-06 fl first alpha, sort of
9 * 2000-08-01 fl fixes for 1.6b1 9 * 2000-08-01 fl fixes for 1.6b1
10 * 2000-08-07 fl use PyOS_CheckStack() if available 10 * 2000-08-07 fl use PyOS_CheckStack() if available
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 1150
1151 } else if (i == b && i == e && n > 0) 1151 } else if (i == b && i == e && n > 0)
1152 /* ignore empty match on latest position */ 1152 /* ignore empty match on latest position */
1153 goto next; 1153 goto next;
1154 1154
1155 if (filter_is_callable) { 1155 if (filter_is_callable) {
1156 /* pass match object through filter */ 1156 /* pass match object through filter */
1157 match = pattern_new_match(self, &state, 1); 1157 match = pattern_new_match(self, &state, 1);
1158 if (!match) 1158 if (!match)
1159 goto error; 1159 goto error;
1160 item = _PyObject_FastCall(filter, &match, 1, NULL); 1160 item = _PyObject_CallArg1(filter, match);
1161 Py_DECREF(match); 1161 Py_DECREF(match);
1162 if (!item) 1162 if (!item)
1163 goto error; 1163 goto error;
1164 } else { 1164 } else {
1165 /* filter is literal string */ 1165 /* filter is literal string */
1166 item = filter; 1166 item = filter;
1167 Py_INCREF(item); 1167 Py_INCREF(item);
1168 } 1168 }
1169 1169
1170 /* add to list */ 1170 /* add to list */
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after
2877 x = PyUnicode_FromString(copyright); 2877 x = PyUnicode_FromString(copyright);
2878 if (x) { 2878 if (x) {
2879 PyDict_SetItemString(d, "copyright", x); 2879 PyDict_SetItemString(d, "copyright", x);
2880 Py_DECREF(x); 2880 Py_DECREF(x);
2881 } 2881 }
2882 return m; 2882 return m;
2883 } 2883 }
2884 2884
2885 /* vim:ts=4:sw=4:et 2885 /* vim:ts=4:sw=4:et
2886 */ 2886 */
OLDNEW
« no previous file with comments | « Modules/_pickle.c ('k') | Objects/abstract.c » ('j') | no next file with comments »

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