Commit f93224d38662a8cdc33ca56fe6f2d5650a86d690

Anthony Green 2022-09-24T21:38:57

moxie: All struct args are passed in memory

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/moxie/ffi.c b/src/moxie/ffi.c
index 15dfaaf..99bcf40 100644
--- a/src/moxie/ffi.c
+++ b/src/moxie/ffi.c
@@ -151,7 +151,7 @@ void ffi_call(ffi_cif *cif,
     {
       ffi_type *at = arg_types[i];
       int size = at->size;
-      if (at->type == FFI_TYPE_STRUCT && size > 4)
+      if (at->type == FFI_TYPE_STRUCT) /*  && size > 4) All struct args?? */
         {
           char *argcopy = alloca (size);
           memcpy (argcopy, avalue[i], size);