I am trying to replicate C program behaviours using Python3 and repeatedly casting all numbers to ctypes.c_int32 get ugly real fast.
Is there any way I could default Python's int to be an instance of ctypes.c_int32?
Edit:
I would like to perform arithmetic operations between multiple c_int32 objects (e.g. xor-ing and and-ing), but I can't do this without adding .value
behind every c_type int object. I want to see if I can somehow override the default python int
object to behave more similarly to c_int32
in ctypes.