kivy-ios
kivy-ios copied to clipboard
Ctypes.CFUNCTYPE needs patching for iOS
Versions
- Python : 3.9.9
- iOS version : any
- XCode Version : any
- Cython version : any
import ctypes
def functown(number: ctypes.c_int):
print(number)
funcy = ctypes.CFUNCTYPE(None, ctypes.c_int)(functown)
This leads to a MemoryError
everytime on iOS(Physical Device), only rarely on desktops/emulator.
Issue is exactly as mentioned here https://bugs.python.org/issue36880
Since this is a known issue we should add it to the patches for python3 on kivy-ios.
Fix as mentioned on the issue.... https://github.com/python/cpython/pull/13364/files
Upon further investigation including the mentioned patch does not help in fixing the issue :/ .
Solution for me was simply to go the cython route. Keeping issue open as it's still relevant and others might come across same issue.
Yes, I got this problem.