diff options
author | Mark Dickinson <mdickinson@enthought.com> | 2011-03-26 10:22:56 (GMT) |
---|---|---|
committer | Mark Dickinson <mdickinson@enthought.com> | 2011-03-26 10:22:56 (GMT) |
commit | 657bd0a25ddac6a951baaa9ac3167d8bce1b7308 (patch) | |
tree | 4659a374a59ce205ca58c36e2e8b4d03f491b7da /Lib/multiprocessing | |
parent | b9a1c5662b37839c9d3e2cbba5893582add09713 (diff) | |
parent | 633872e3fbfba101dcae0fb1d6938c91e10adafe (diff) | |
download | cpython-657bd0a25ddac6a951baaa9ac3167d8bce1b7308.zip cpython-657bd0a25ddac6a951baaa9ac3167d8bce1b7308.tar.gz cpython-657bd0a25ddac6a951baaa9ac3167d8bce1b7308.tar.bz2 |
Merge #11675
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r-- | Lib/multiprocessing/sharedctypes.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/multiprocessing/sharedctypes.py b/Lib/multiprocessing/sharedctypes.py index e83ce58..1e694da 100644 --- a/Lib/multiprocessing/sharedctypes.py +++ b/Lib/multiprocessing/sharedctypes.py @@ -80,7 +80,9 @@ def RawArray(typecode_or_type, size_or_initializer): type_ = typecode_to_type.get(typecode_or_type, typecode_or_type) if isinstance(size_or_initializer, int): type_ = type_ * size_or_initializer - return _new_value(type_) + obj = _new_value(type_) + ctypes.memset(ctypes.addressof(obj), 0, ctypes.sizeof(obj)) + return obj else: type_ = type_ * len(size_or_initializer) result = _new_value(type_) |