summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ffi.c4
-rw-r--r--txr.122
2 files changed, 16 insertions, 10 deletions
diff --git a/ffi.c b/ffi.c
index 47ca544b..8d702c26 100644
--- a/ffi.c
+++ b/ffi.c
@@ -4463,7 +4463,7 @@ val ffi_elemsize(val type)
val self = lit("ffi-elemsize");
struct txr_ffi_type *tft = ffi_type_struct_checked(self, type);
if (!tft->eltype) {
- uw_throwf(error_s, lit("~a: ~s isn't an array or pointer"),
+ uw_throwf(error_s, lit("~a: ~s isn't an array, pointer or enum"),
self, type, nao);
} else {
struct txr_ffi_type *etft = ffi_type_struct(tft->eltype);
@@ -4478,7 +4478,7 @@ val ffi_elemtype(val type)
val eltype = tft->eltype;
if (!eltype) {
- uw_throwf(error_s, lit("~a: ~s isn't an array or pointer"),
+ uw_throwf(error_s, lit("~a: ~s isn't an array, pointer or enum"),
self, type, nao);
}
diff --git a/txr.1 b/txr.1
index 3f5e652b..47d9c084 100644
--- a/txr.1
+++ b/txr.1
@@ -63744,17 +63744,20 @@ or
The
.code ffi-elemsize
function reports the size of the element type of an array,
-or of the target type of pointer.
+of the target type of a pointer, or of the base integer type of an enumeration.
The
.meta type
-argument must be an array or pointer type: an
+argument must be an array, pointer or enumeration type: a type constructed
+by one of the operators
.codn array ,
.codn zarray ,
.codn carray ,
.codn ptr ,
-.code ptr-in
+.codn ptr-in ,
+.codn ptr-out ,
+.code enum
or
-.codn ptr-out .
+.codn enumed .
.TP* Example:
@@ -63770,17 +63773,20 @@ or
The
.code ffi-elemtype
function retrieves the element type of an array type,
-or target type of a pointer type.
+target type of a pointer type, or base integer type of an enumeration.
The
.meta type
-argument must be an array or pointer type: an
+argument must be an array, pointer or enumeration type: a type constructed
+by one of the operators
.codn array ,
.codn zarray ,
.codn carray ,
.codn ptr ,
-.code ptr-in
+.codn ptr-in ,
+.codn ptr-out ,
+.code enum
or
-.codn ptr-out .
+.codn enumed .
.TP* Example: