bpo-38075: Fix random_seed(): use PyObject_CallOneArg() (GH-18897)

Fix the random.Random.seed() method when a bool is passed as the
seed.

PyObject_Vectorcall() was misused: use PyObject_CallOneArg() instead.
This commit is contained in:
Victor Stinner 2020-03-10 15:15:14 +01:00 committed by GitHub
parent 8510f43078
commit 00d7cd8ab8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View file

@ -42,7 +42,7 @@ class TestBasicOps:
def __hash__(self):
return -1729
for arg in [None, 0, 1, -1, 10**20, -(10**20),
3.14, 'a']:
False, True, 3.14, 'a']:
self.gen.seed(arg)
for arg in [1+2j, tuple('abc'), MySeed()]: