Suppose I have the C function which returns void
void mysub_wrapper(int *a, int *b)
{
*b = *a + 1;
}
Can I make a wrapper with Cython which passes a
and b
by reference:
cdef extern void mysub_wrapper(int *a, int *b)
def mysub(int a, int b):
mysub_wrapper(&a, &b)
Such that it can be called in python with
a = 1
b = 0
mysub(a, b)
In other words, can I do the calculation "in place".