Fix #50 - ptr object to pointer

This commit is contained in:
Ganesh Viswanathan 2019-01-21 00:17:44 -06:00
commit 22d8181073
6 changed files with 32 additions and 19 deletions

View file

@ -54,4 +54,8 @@ float test_call_param8(int *param1) {
*param1 = 5 * *param1;
return 1.0 * *param1;
}
void *test_call9() {
return NULL;
}

View file

@ -1,3 +1,5 @@
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -81,6 +83,7 @@ typedef struct struct5 {
int (*tci)();
struct STRUCT1 (*tcp)(int);
float (*tcp8)(int *i);
void *(*tcv)();
} STRUCT5;
union UNION1 {
@ -102,6 +105,7 @@ union UNION1 test_call_param5(float param1);
unsigned char test_call_param6(UNION2 param1);
int test_call_param7(union UNION1 param1);
float test_call_param8(int *param1);
void *test_call9();
#ifdef __cplusplus
}

View file

@ -64,8 +64,10 @@ s5.tci = test_call_int
s5.tcp = test_call_param
s5.tcp8 = test_call_param8
s51.tci = test_call_int
s51.tcv = test_call9
check s5.tci() == 5
check s51.tci() == 5
check s51.tcv() == nil
e = enum1
e2 = enum4
@ -97,6 +99,8 @@ else:
check test_call_param8(addr i) == 25.0
check i == 25
check test_call9() == nil
check e3 == enum7
check e4 == enum11