summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-28 15:27:34 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-28 15:27:34 (GMT)
commit86e58e239e39845e706c4afa392423f0fedcdf39 (patch)
tree1d0f4d942e644ee5c903636d87176b98a7203371 /Python/ceval.c
parentecfd0b2f3bfd622c3ba148e53d3feebb8c1ae721 (diff)
downloadcpython-86e58e239e39845e706c4afa392423f0fedcdf39.zip
cpython-86e58e239e39845e706c4afa392423f0fedcdf39.tar.gz
cpython-86e58e239e39845e706c4afa392423f0fedcdf39.tar.bz2
SF patch 1547796 by Georg Brandl -- set literals.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 95def9a..25e6a0b 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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);