From 86e58e239e39845e706c4afa392423f0fedcdf39 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 28 Aug 2006 15:27:34 +0000 Subject: SF patch 1547796 by Georg Brandl -- set literals. --- Python/ceval.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Python/ceval.c') diff --git a/Python/ceval.c b/Python/ceval.c index 95def9a954..25e6a0b4cf 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); -- cgit v1.2.1