summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2007-02-23 19:56:57 (GMT)
committerThomas Wouters <thomas@python.org>2007-02-23 19:56:57 (GMT)
commit00e41defe8801ef37548fb60abacb3be13156d2a (patch)
tree863d072e568fee2b8f4959016b5954de457c7f4c /Python/ceval.c
parentcf297e46b85257396560774e5492e9d71a40f32e (diff)
downloadcpython-00e41defe8801ef37548fb60abacb3be13156d2a.zip
cpython-00e41defe8801ef37548fb60abacb3be13156d2a.tar.gz
cpython-00e41defe8801ef37548fb60abacb3be13156d2a.tar.bz2
Bytes literal.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 0194687..5ceb743 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1885,6 +1885,19 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
PUSH(x);
if (x != NULL) continue;
break;
+
+ case MAKE_BYTES:
+ w = POP();
+ if (PyString_Check(w))
+ x = PyBytes_FromStringAndSize(
+ PyString_AS_STRING(w),
+ PyString_GET_SIZE(w));
+ else
+ x = NULL;
+ Py_DECREF(w);
+ PUSH(x);
+ if (x != NULL) continue;
+ break;
case LOAD_ATTR:
w = GETITEM(names, oparg);