Next: , Up: Basic C Types and Functions   [Contents][Index]


65.1.1 Predefined FFI data types

The following assortment lists all predefined C data types. These types are also known as Basic FFI types. We assume these to be well known and do not explain them further.

As with C data types, the actual meaning of these types depends on the system architecture, but there is no difference between these FFI predefined types and their C-pendant if FFI is run on the same machine.

However, the last two types in the list are special in that they are actually a (pointer char) (in C known as ‘char*’), but (as the name suggests) data of this type form a string on C level, or arbitrary chunks of (bytewise-oriented) data which is translated to or translated from an ordinary emacs string. In constrast, we should mention that the ‘char*’ is actually solely a pointer to one character, and not a string a priori.

In order to handle arbitrary binary data blocks, the type c-data can be used in conjunction with a size parameter (see The c-data form). Strings – the internal representation of data of this type – are (re-)encoded to binary (i.e. the generic binary coding system) due to Mule issues.