Closed piyanatk closed 5 years ago
Upon inspecting the code, it looks like cffi
was loaded but never used. Perhaps, @sievers was just looking into it?
Sorry that was me! I was looking into CFFI as a modern alternative to interfacing with C, except I never got round to actually implementing it. I was planning on removing it.
I see! @ronniyjoseph , Is the current implementation with ctypes
working?
Yes, the current implementation with ctypes works. However, yes there might some merit to investigating alternate c-interfaces
I think for now we should stick with ctypes. Improving the C code should be postpone to our next milestone. I am going to close this for now. We will reopen it once revisited this issue.
The current Python codes use both
ctypes
andcffi
to interface with the C functions. These are two different C interfacing modules:ctypes
is in the standard library, whereascffi
is a newer external module. I am not sure if they should be mixed as in the current codes, andcffi
seems to be better(?) according to online discussion, so we may want to consider droppingctypes
forcffi
. Another common option for working with C in Python isCython
, and there are many more (see here and here)