Opened 11 years ago

Last modified 7 years ago

#739 new enhancement

Allow more specific foreign types

Reported by: Moritz Heidkamp Owned by: felix winkelmann
Priority: minor Milestone:
Component: compiler Version: 4.7.x
Keywords: ffi foreign types Cc:
Estimated difficulty: medium


Currently, typedefs cannot be used directly but have to be replaced by an approximated equivalent FFI type, e.g. typedef unsigned int foo would have to to be referred to as unsigned-int yielding some compiler warnings. Even worse: If the type is defined differently for different platforms, say, it might not work at all. My suggestion is to allow a similar construct like (struct "foo") to say (unsigned-int "foo"). With this the compiler would know what foreign type to use but insert the correct typedef name in the generated code.

Change History (2)

comment:1 Changed 11 years ago by felix winkelmann

Milestone: 4.8.0

comment:2 Changed 7 years ago by sjamaan

Estimated difficulty: medium
Note: See TracTickets for help on using tickets.