Is there a way to get a pointer to an element in the middle of an ctypes array? Example:
lib = ctypes.cdll.LoadLibrary('./lib.so')
arr = (ctypes.c_int32 * 100)()
lib.foo(arr)
Now I don't want to call foo with a pointer to the first element of arr, but on the 10th. That would be equivalent to C notation &arr[9]:
lib.foo(&arr[9])
Is there a smart way to do this?
foofunction declaration looks like?void foo(int32_t *arr)