3 ms·
ctypes allows you to trivially mistype C objects, send the wrong types and number of arguments to C functions, etc. Cffi just imports C headers and gives you m
by loeg 7y ago
ctypes allows you to trivially mistype C objects, send the wrong types and number of arguments to C functions, etc. Cffi just imports C headers and gives you more or less what TFA illustrates (without D).
- yellowapple 7y ago> ctypes allows you to trivially mistype C objects I mean, so does C. Pretty sure that's a "feature". ;) But yeah, fair point; it's definitely nice when an FFI wrapper is able to actually read the header files and figure out function/type signatures.