More type changes for correctness in order to compile with mypyc in the future.

This commit is contained in:
Jennifer Taylor
2021-05-31 18:13:43 +00:00
parent 0a1cfb6f07
commit 7809ff360f
12 changed files with 426 additions and 372 deletions
+5 -2
View File
@@ -132,5 +132,8 @@ def affine_composite(
if errors != 0:
raise Exception("Error raised in C++!")
# We blitted in-place, return that.
return Image.frombytes('RGBA', (imgwidth, imgheight), imgbytes)
# We blitted in-place, return that. There seems to be a reference bug in Cython
# when called from compiled mypyc code, so if we don't assign to a local variable
# first this function appears to return None.
img = Image.frombytes('RGBA', (imgwidth, imgheight), imgbytes)
return img