Returns a ctypes array allocated from shared memory
'''
type_ = typecode_to_type.get(typecode_or_type, typecode_or_type)
- if isinstance(size_or_initializer, int):
+ if isinstance(size_or_initializer, (int, long)):
type_ = type_ * size_or_initializer
return _new_value(type_)
else:
def test_rawarray(self):
self.test_array(raw=True)
+ @unittest.skipIf(c_int is None, "requires _ctypes")
+ def test_array_accepts_long(self):
+ arr = self.Array('i', 10L)
+ self.assertEqual(len(arr), 10)
+ raw_arr = self.RawArray('i', 10L)
+ self.assertEqual(len(raw_arr), 10)
+
@unittest.skipIf(c_int is None, "requires _ctypes")
def test_getobj_getlock_obj(self):
arr1 = self.Array('i', range(10))
Library
-------
+- Issue #11673: Fix multiprocessing Array and RawArray constructors to accept a
+ size of type 'long', rather than only accepting 'int'.
+
- Issue #10042: Fixed the total_ordering decorator to handle cross-type
comparisons that could lead to infinite recursion.