mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
SF patch 1547796 by Georg Brandl -- set literals.
This commit is contained in:
parent
ecfd0b2f3b
commit
86e58e239e
22 changed files with 229 additions and 72 deletions
|
@ -1945,6 +1945,24 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
|
|||
}
|
||||
break;
|
||||
|
||||
case BUILD_SET:
|
||||
x = PySet_New(NULL);
|
||||
if (x != NULL) {
|
||||
for (; --oparg >= 0;) {
|
||||
w = POP();
|
||||
if (err == 0)
|
||||
err = PySet_Add(x, w);
|
||||
Py_DECREF(w);
|
||||
}
|
||||
if (err != 0) {
|
||||
Py_DECREF(x);
|
||||
break;
|
||||
}
|
||||
PUSH(x);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
case BUILD_MAP:
|
||||
x = PyDict_New();
|
||||
PUSH(x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue