Jul-18-2023, 07:01 PM
(This post was last modified: Jul-18-2023, 07:01 PM by deanhystad.)
Quote:I read about ctypes library. It has fixed-sized types, such as c_ulonglong, which seems to be exactly what I need. Unfortunately, I couldn't figure out how to multiply two c_ulonglong values, as Python gives error "unsupported operand" when trying to multiply a c_ulonglong with another c_ulonglong Confusedctypes is a library that makes it easier to call C functions. It makes C-like data types, but it does not provide C math support. You would use ctypes to call your fixed size integer math equation from the C library that was installed as part of your portable Python package.
Some documentation about how you call C functions from Python.
https://docs.python.org/3/extending/extending.html