@@ -145,6 +145,24 @@ singleton rts qht = mkContext [(rts, qht, True)]
145145
146146-- * Some handy contexts
147147
148+ -- | Types defined in 'Foreign.C.Types' and the 'std::ffi' module.
149+ ffi :: Q Context
150+ ffi = mkContext
151+ [ ([ty | std::ffi::c_char |], [t | CChar |], False )
152+ , ([ty | std::ffi::c_double |], [t | CDouble |], False )
153+ , ([ty | std::ffi::c_float |], [t | CFloat |], False )
154+ , ([ty | std::ffi::c_int |], [t | CInt |], False )
155+ , ([ty | std::ffi::c_long |], [t | CLong |], False )
156+ , ([ty | std::ffi::c_longlong |], [t | CLLong |], False )
157+ , ([ty | std::ffi::c_schar |], [t | CSChar |], False )
158+ , ([ty | std::ffi::c_short |], [t | CShort |], False )
159+ , ([ty | std::ffi::c_uchar |], [t | CUChar |], False )
160+ , ([ty | std::ffi::c_uint |], [t | CUInt |], False )
161+ , ([ty | std::ffi::c_ulong |], [t | CULong |], False )
162+ , ([ty | std::ffi::c_ulonglong |], [t | CULLong |], False )
163+ , ([ty | std::ffi::c_ushort |], [t | CUShort |], False )
164+ ]
165+
148166-- | Types defined in 'Foreign.C.Types' and the 'libc' crate.
149167--
150168-- There should be no conversion required here - these have /identical/ memory
0 commit comments