summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2016-02-20 06:40:03 -0500
committerAnthony Green <green@moxielogic.com>2016-02-20 06:40:03 -0500
commite7c713a0b64c425b51f3d9437a8db7ca497e6c31 (patch)
treef5a7e1c27dde0952cf4548cea9666e7abcd282f6 /doc
parent79666abca87ac67d2d05b477a3ba71ec18b8af0c (diff)
parentf45e9e35700d7c547ba33b02c4186e746dea204a (diff)
downloadlibffi-e7c713a0b64c425b51f3d9437a8db7ca497e6c31.tar.gz
Merge pull request #214 from tromey/document-enum-support
document (lack of) enum handling in libffi
Diffstat (limited to 'doc')
-rw-r--r--doc/libffi.texi16
1 files changed, 13 insertions, 3 deletions
diff --git a/doc/libffi.texi b/doc/libffi.texi
index 87a4f50..5c9fddd 100644
--- a/doc/libffi.texi
+++ b/doc/libffi.texi
@@ -269,7 +269,7 @@ int main()
* Primitive Types:: Built-in types.
* Structures:: Structure types.
* Size and Alignment:: Size and alignment of types.
-* Arrays and Unions:: Arrays and unions.
+* Arrays Unions Enums:: Arrays, unions, and enumerations.
* Type Example:: Structure type example.
* Complex:: Complex types.
* Complex Type Example:: Complex type example.
@@ -463,8 +463,8 @@ if (ffi_prep_cif (&cif, desired_abi, 0, desired_type, NULL) == FFI_OK)
@}
@end example
-@node Arrays and Unions
-@subsection Arrays and Unions
+@node Arrays Unions Enums
+@subsection Arrays, Unions, and Enumerations
@subsubsection Arrays
@@ -541,6 +541,16 @@ for (i = 0; union_elements[i]; ++i)
@}
@end example
+@subsubsection Enumerations
+
+@code{libffi} does not have any special support for C @code{enum}s.
+Although any given @code{enum} is implemented using a specific
+underlying integral type, exactly which type will be used cannot be
+determined by @code{libffi} -- it may depend on the values in the
+enumeration or on compiler flags such as @option{-fshort-enums}.
+@xref{Structures unions enumerations and bit-fields implementation, , , gcc},
+for more information about how GCC handles enumerations.
+
@node Type Example
@subsection Type Example