diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2018-10-30 22:18:49 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2018-10-30 22:18:49 +0100 |
commit | 32370aa6eb31998b938de513bef680f3389472c5 (patch) | |
tree | c62dae21121454674ecfda74edbd5492fcb1f632 /Cython/Compiler/ParseTreeTransforms.py | |
parent | 70b6b3c938ca0336a37cb0413766c178454558d3 (diff) | |
parent | d774524e35aef599883361c515caa9446fa8adc2 (diff) | |
download | cython-32370aa6eb31998b938de513bef680f3389472c5.tar.gz |
Merge branch '0.29.x'
Diffstat (limited to 'Cython/Compiler/ParseTreeTransforms.py')
-rw-r--r-- | Cython/Compiler/ParseTreeTransforms.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index 9753a2f61..f4c0f5c36 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -1707,6 +1707,8 @@ if VALUE is not None: # so it can be pickled *after* self is memoized. unpickle_func = TreeFragment(u""" def %(unpickle_func_name)s(__pyx_type, long __pyx_checksum, __pyx_state): + cdef object __pyx_PickleError + cdef object __pyx_result if __pyx_checksum != %(checksum)s: from pickle import PickleError as __pyx_PickleError raise __pyx_PickleError("Incompatible checksums (%%s vs %(checksum)s = (%(members)s))" %% __pyx_checksum) @@ -1735,6 +1737,8 @@ if VALUE is not None: pickle_func = TreeFragment(u""" def __reduce_cython__(self): + cdef tuple state + cdef object _dict cdef bint use_setstate state = (%(members)s) _dict = getattr(self, '__dict__', None) |