diff options
author | Damien George <damien.p.george@gmail.com> | 2015-01-13 16:21:23 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-01-13 16:21:23 +0000 |
commit | 4c81ba8015238a343593468aa5173440fd392e32 (patch) | |
tree | 06da514f28ea3ef4758898f533e29c33a6c250c9 /tests/basics/bytes_large.py | |
parent | dab1385177558f1d27c03b59e443b6fa25a2cdc0 (diff) |
py: Never intern data of large string/bytes object; add relevant tests.
Previously to this patch all constant string/bytes objects were
interned by the compiler, and this lead to crashes when the qstr was too
long (noticeable now that qstr length storage defaults to 1 byte).
With this patch, long string/bytes objects are never interned, and are
referenced directly as constant objects within generated code using
load_const_obj.
Diffstat (limited to 'tests/basics/bytes_large.py')
-rw-r--r-- | tests/basics/bytes_large.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/basics/bytes_large.py b/tests/basics/bytes_large.py new file mode 100644 index 000000000..9b6b79bbb --- /dev/null +++ b/tests/basics/bytes_large.py @@ -0,0 +1,2 @@ +b1 = b"long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes long bytes" +b2 = b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" b"concatenated bytes" |