mirror of
https://github.com/python/cpython.git
synced 2025-09-03 15:31:08 +00:00
Bytes literal.
This commit is contained in:
parent
cf297e46b8
commit
00e41defe8
15 changed files with 179 additions and 19 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue