Skip to contents

Look up the integer value for a named enum constant.

Usage

ffi_enum_to_int(enum_type, name)

Arguments

enum_type

EnumType object

name

Character name of enum constant

Value

Integer value

Examples

if (FALSE) { # \dontrun{
Color <- ffi_enum(RED = 0L, GREEN = 1L, BLUE = 2L)
ffi_enum_to_int(Color, "GREEN") # 1L
} # }