On Thu, 2014-01-09 at 01:08 +0000, Luís Oliveira wrote:
On Thu, Jan 9, 2014 at 12:15 AM, Massimiliano Ghilardi massimiliano.ghilardi@gmail.com wrote:
- Thinking that (or actually defining) MAP_FAILED = -1 is misleading. MAP_FAILED is (void *)-1.
Your patch looks good. Perhaps we could teach cffi-grovel how to grovel pointers, then we'd be able to ditch the *map-failed-pointer* bits. I've attached an untested patch that does that. Does using (constant ... :type pointer) for the MAP_* constants solve the problem you found?
Somebody with more free time than me should try to back-port into cffi iolib-grovel, which is cffi-grovel modified to use C++. iolib-grovel has no problems with pointers because it uses C++ polymorphism and its implicit casts for grovelling.