commit | 00e41defe8801ef37548fb60abacb3be13156d2a | [log] [tgz] |
---|---|---|
author | Thomas Wouters <thomas@python.org> | Fri Feb 23 19:56:57 2007 +0000 |
committer | Thomas Wouters <thomas@python.org> | Fri Feb 23 19:56:57 2007 +0000 |
tree | 863d072e568fee2b8f4959016b5954de457c7f4c | |
parent | cf297e46b85257396560774e5492e9d71a40f32e [diff] [blame] |
Bytes literal.
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 @@ 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);