[Python-Dev] cffi in stdlib

Paul Moore p.f.moore at gmail.com
Thu Feb 28 10:21:25 CET 2013

On 28 February 2013 09:06, Armin Rigo <arigo at tunes.org> wrote:
> And I think
> that even on 64-bit Windows, passing 0 as a NULL pointer is buggy,
> because it will pass a 32-bit 0.  (It may be that it doesn't actually
> make a difference and works anyway, but I'm not sure.)  Similarly, a
> function that returns a pointer (e.g. a handle on Windows) will not
> work without an explicit restype on any 64-bit platform I know of.
> "Explicit is better than implicit"...

Ha, interesting. My test case was run on 64-bit Windows with 64-bit
Python, and worked fine. But you're right, explicit is better, and I
may have been luckier than I realised. And anyway my original point
about whether cffi was as concise as ctypes for simple ABI-level
Windows calls has been answered - yes it is, at least the next version
will be.


More information about the Python-Dev mailing list