Fix #50 - ptr object to pointer
This commit is contained in:
parent
783cf70fbf
commit
22d8181073
6 changed files with 32 additions and 19 deletions
|
|
@ -54,4 +54,8 @@ float test_call_param8(int *param1) {
|
|||
*param1 = 5 * *param1;
|
||||
|
||||
return 1.0 * *param1;
|
||||
}
|
||||
|
||||
void *test_call9() {
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue