there is an IPython magic for CFFI: https://github.com/Carreau/cffi_magic
https://tmarkovich.github.io//articles/2017-08/linking-python-to-c-with-cffi
these are just some random experiments ...
from cffi import FFI
ffi = FFI()
ffi.cdef("""
typedef void mytype;
""")
ptrptr = ffi.new("mytype**")
ptrptr
type(ptrptr)
ptrptr[0]
ptrptr[0] += 1
ptrptr[0]
ptr = ptrptr[0]
ptr
type(ptr)
ptr
is a separate, non-owning cdata object. It is not pointing to the original data.
ptr += 1
ptr
ptrptr[0]
del ptrptr
ptr