A fix to the struct type example (#837)
authorFlorian <florian.atteneder@gmail.com>
Sat, 1 Jun 2024 17:39:24 +0000 (19:39 +0200)
committerGitHub <noreply@github.com>
Sat, 1 Jun 2024 17:39:24 +0000 (13:39 -0400)
Section 2.3.2 Structures of the docs declare `ffi_type`'s  `elements` field to be of type `ffi_type **`.

doc/libffi.texi

index d072a213f13216b7bf3a49bb304cbcbae7bcca5a..e82f94402c16e3f8d36e4caa58c8978139947a46 100644 (file)
@@ -627,7 +627,7 @@ Here is the corresponding code to describe this struct to
 
       tm_type.size = tm_type.alignment = 0;
       tm_type.type = FFI_TYPE_STRUCT;
-      tm_type.elements = &tm_type_elements;
+      tm_type.elements = tm_type_elements;
 
       for (i = 0; i < 9; i++)
           tm_type_elements[i] = &ffi_type_sint;