diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2013-10-28 21:41:24 +0100 |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2013-10-28 21:41:24 +0100 |
commit | acf010d6b83e6ee4bc916a61b04938f2f4205810 (patch) | |
tree | 20104eff0d9561d62fc9f538a7882d7b98e00ac1 /Python/frozen.c | |
parent | 284a788ebc97e88858f9299669470438dcf0ebfb (diff) | |
parent | c3408df66ec4dbebcbbfc283cebd9736d97f5f1c (diff) | |
download | cpython-acf010d6b83e6ee4bc916a61b04938f2f4205810.tar.gz |
#19395: Raise exception when pickling a (BZ2|LZMA)(Compressor|Decompressor).
The underlying C libraries provide no mechanism for serializing compressor and
decompressor objects, so actually pickling these classes is impractical.
Previously, these objects would be pickled without error, but attempting to use
a deserialized instance would segfault the interpreter.
Diffstat (limited to 'Python/frozen.c')
-rw-r--r-- | Python/frozen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/frozen.c b/Python/frozen.c index 25fdc17b3f..9bc662b994 100644 --- a/Python/frozen.c +++ b/Python/frozen.c @@ -28,7 +28,7 @@ static unsigned char M___hello__[] = { #define SIZE (int)sizeof(M___hello__) -static struct _frozen _PyImport_FrozenModules[] = { +static const struct _frozen _PyImport_FrozenModules[] = { /* importlib */ {"_frozen_importlib", _Py_M__importlib, (int)sizeof(_Py_M__importlib)}, /* Test module */ @@ -42,4 +42,4 @@ static struct _frozen _PyImport_FrozenModules[] = { /* Embedding apps may change this pointer to point to their favorite collection of frozen modules: */ -struct _frozen *PyImport_FrozenModules = _PyImport_FrozenModules; +const struct _frozen *PyImport_FrozenModules = _PyImport_FrozenModules; |