[m-rev.] for review: clarify how foreign_enum values are specified in C

Julien Fischer jfischer at opturion.com
Sat Sep 25 15:33:09 AEST 2021


For review by anyone.

---------------------

Clarify how foreign_enum values are specified in C.

In particular, add that they can be specified using enumeration constants

doc/reference_manual.texi:
      As above.

Julien.

diff --git a/doc/reference_manual.texi b/doc/reference_manual.texi
index f81b1a7..26e92a0 100644
--- a/doc/reference_manual.texi
+++ b/doc/reference_manual.texi
@@ -9551,8 +9551,13 @@ as the use of @samp{pragma foreign_type} results in more type-safe code.
  @subsubsection Using pragma foreign_enum for C

  Foreign enumeration values in C must be constants of type @code{MR_Integer}.
-They may be specified as either integer literals
-or via preprocessor macros that expand to integer literals.
+A foreign enumeration value may be specified by one of the following:
+ at itemize
+ at item An integer literal.
+ at item An enumeration constant.
+ at item A preprocessor macro that expands to either an integer literal or
+an enumeration constant.
+ at end itemize

  @node Using pragma foreign_export_enum for C
  @subsubsection Using pragma foreign_export_enum for C





More information about the reviews mailing list