Re: [python-cffi] cffi.FFI.cdef and implicit function declarations
Florian Weimer <[email protected]> Wed, 08 Feb 2023 14:57:08 +0100
| Newsgroups | dev.linux.lists.c-std-porting |
|---|---|
| Message-ID | <[email protected]> |
* Armin Rigo: > Hi again, > > On Wed, 8 Feb 2023 at 13:12, Armin Rigo <[email protected]> wrote: >> make the declared functions available to the C code. A typical usage >> is to say ffi.verify('#include <something.h>'). If you are getting an >> "implicit function" warning from the C compiler, then this was not >> done correctly. > > ...In other words, if changes to the C compiler replaces these > warnings with errors, and this breaks old existing code, then that old > code was broken in the first place for relying on that feature. I > don't think there is something to say about that specifically for > CFFI's old verify() API. I think the problem is the same as people will > encounter with old, manually-written C code which was broken the same way. > The fix is to add the missing #include in both cases. For ffi.verify() > it is added in the first argument, which is copied into the generated C code. Okay, this is good to know. Thank you for taking the time to explain it. Florian