diff options
author | Camil Staps | 2016-02-01 17:47:57 +0100 |
---|---|---|
committer | Camil Staps | 2016-02-01 17:47:57 +0100 |
commit | 921200f7d3790ba5a1f61d750b6d84bf917db966 (patch) | |
tree | 3409353cfe827abdc0b9fabacf8bef787d1912ed /interface.c | |
parent | Better practices string copying (diff) |
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/interface.c b/interface.c index 2a9a106..e40ed86 100644 --- a/interface.c +++ b/interface.c @@ -68,17 +68,21 @@ void cleanPutr(double r) { void cleanSetReturnType(long i) { switch (i) { case 0: - return_type = &ffi_type_slong; + return_type = &ffi_type_slong; return_val = calloc(sizeof(long), 1); break; case 1: - return_type = &ffi_type_pointer; + return_type = &ffi_type_pointer; return_val = calloc(sizeof(char*), 1); break; case 2: - return_type = &ffi_type_double; + return_type = &ffi_type_double; return_val = calloc(sizeof(double), 1); break; + case 3: + return_type = &ffi_type_void; + return_val = calloc(sizeof(void), 1); + break; } } |