Summary
Allow more specific foreign types
Metadata
- Id: 3997fba8e4327d51883d2df5e253de5c68841a4a
- Trac id: 739
- Type: enhancement
- Reporter: syn
- Owner: felix
- Cc:
- Status: closed
- Component: compiler
- Estimated difficulty: medium
- Resolution: wontfix
- Priority: minor
- Milestone:
- Version: 4.7.x
- Changetime: 2023-06-03 11:51:41 UTC
- Created: 2011-12-11 17:29:19 UTC
- Keywords: ffi foreign types
Description
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.