Skip to content

Commit

Permalink
Revert "Allow incorrect typedef with va_list"
Browse files Browse the repository at this point in the history
This reverts commit 15510d0.
  • Loading branch information
gerard-ryan-immersaview committed May 27, 2024
1 parent 862229c commit 39bd9ac
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 57 deletions.
10 changes: 3 additions & 7 deletions tests/expectations/va_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,19 @@

typedef int32_t (*VaListFnPtr)(va_list);

typedef int32_t (*VaListFnPtr2)(void);
typedef int32_t (*VaListFnPtr2)(va_list);

typedef struct {
int32_t (*fn1)(va_list);
} Interface_______i32_______va_list;

typedef struct {
int32_t (*fn1)(void);
} Interface_______i32;

int32_t va_list_test(va_list ap);

int32_t va_list_test2(va_list ap);

void va_list_fn_ptrs(int32_t (*fn1)(va_list),
int32_t (*fn2)(void),
int32_t (*fn2)(va_list),
VaListFnPtr fn3,
VaListFnPtr2 fn4,
Interface_______i32_______va_list fn5,
Interface_______i32 fn6);
Interface_______i32_______va_list fn6);
10 changes: 3 additions & 7 deletions tests/expectations/va_list.compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@

typedef int32_t (*VaListFnPtr)(va_list);

typedef int32_t (*VaListFnPtr2)(void);
typedef int32_t (*VaListFnPtr2)(va_list);

typedef struct {
int32_t (*fn1)(va_list);
} Interface_______i32_______va_list;

typedef struct {
int32_t (*fn1)(void);
} Interface_______i32;

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
Expand All @@ -24,11 +20,11 @@ int32_t va_list_test(va_list ap);
int32_t va_list_test2(va_list ap);

void va_list_fn_ptrs(int32_t (*fn1)(va_list),
int32_t (*fn2)(void),
int32_t (*fn2)(va_list),
VaListFnPtr fn3,
VaListFnPtr2 fn4,
Interface_______i32_______va_list fn5,
Interface_______i32 fn6);
Interface_______i32_______va_list fn6);

#ifdef __cplusplus
} // extern "C"
Expand Down
6 changes: 3 additions & 3 deletions tests/expectations/va_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

using VaListFnPtr = int32_t(*)(va_list);

using VaListFnPtr2 = int32_t(*)();
using VaListFnPtr2 = int32_t(*)(va_list);

template<typename T>
struct Interface {
Expand All @@ -20,10 +20,10 @@ int32_t va_list_test(va_list ap);
int32_t va_list_test2(va_list ap);

void va_list_fn_ptrs(int32_t (*fn1)(va_list),
int32_t (*fn2)(),
int32_t (*fn2)(va_list),
VaListFnPtr fn3,
VaListFnPtr2 fn4,
Interface<int32_t(*)(va_list)> fn5,
Interface<int32_t(*)()> fn6);
Interface<int32_t(*)(va_list)> fn6);

} // extern "C"
9 changes: 3 additions & 6 deletions tests/expectations/va_list.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,18 @@ cdef extern from *:

ctypedef int32_t (*VaListFnPtr)(va_list);

ctypedef int32_t (*VaListFnPtr2)();
ctypedef int32_t (*VaListFnPtr2)(va_list);

ctypedef struct Interface_______i32_______va_list:
int32_t (*fn1)(va_list);

ctypedef struct Interface_______i32:
int32_t (*fn1)();

int32_t va_list_test(va_list ap);

int32_t va_list_test2(va_list ap);

void va_list_fn_ptrs(int32_t (*fn1)(va_list),
int32_t (*fn2)(),
int32_t (*fn2)(va_list),
VaListFnPtr fn3,
VaListFnPtr2 fn4,
Interface_______i32_______va_list fn5,
Interface_______i32 fn6);
Interface_______i32_______va_list fn6);
10 changes: 3 additions & 7 deletions tests/expectations/va_list_both.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,19 @@

typedef int32_t (*VaListFnPtr)(va_list);

typedef int32_t (*VaListFnPtr2)(void);
typedef int32_t (*VaListFnPtr2)(va_list);

typedef struct Interface_______i32_______va_list {
int32_t (*fn1)(va_list);
} Interface_______i32_______va_list;

typedef struct Interface_______i32 {
int32_t (*fn1)(void);
} Interface_______i32;

int32_t va_list_test(va_list ap);

int32_t va_list_test2(va_list ap);

void va_list_fn_ptrs(int32_t (*fn1)(va_list),
int32_t (*fn2)(void),
int32_t (*fn2)(va_list),
VaListFnPtr fn3,
VaListFnPtr2 fn4,
struct Interface_______i32_______va_list fn5,
struct Interface_______i32 fn6);
struct Interface_______i32_______va_list fn6);
10 changes: 3 additions & 7 deletions tests/expectations/va_list_both.compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@

typedef int32_t (*VaListFnPtr)(va_list);

typedef int32_t (*VaListFnPtr2)(void);
typedef int32_t (*VaListFnPtr2)(va_list);

typedef struct Interface_______i32_______va_list {
int32_t (*fn1)(va_list);
} Interface_______i32_______va_list;

typedef struct Interface_______i32 {
int32_t (*fn1)(void);
} Interface_______i32;

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
Expand All @@ -24,11 +20,11 @@ int32_t va_list_test(va_list ap);
int32_t va_list_test2(va_list ap);

void va_list_fn_ptrs(int32_t (*fn1)(va_list),
int32_t (*fn2)(void),
int32_t (*fn2)(va_list),
VaListFnPtr fn3,
VaListFnPtr2 fn4,
struct Interface_______i32_______va_list fn5,
struct Interface_______i32 fn6);
struct Interface_______i32_______va_list fn6);

#ifdef __cplusplus
} // extern "C"
Expand Down
10 changes: 3 additions & 7 deletions tests/expectations/va_list_tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,19 @@

typedef int32_t (*VaListFnPtr)(va_list);

typedef int32_t (*VaListFnPtr2)(void);
typedef int32_t (*VaListFnPtr2)(va_list);

struct Interface_______i32_______va_list {
int32_t (*fn1)(va_list);
};

struct Interface_______i32 {
int32_t (*fn1)(void);
};

int32_t va_list_test(va_list ap);

int32_t va_list_test2(va_list ap);

void va_list_fn_ptrs(int32_t (*fn1)(va_list),
int32_t (*fn2)(void),
int32_t (*fn2)(va_list),
VaListFnPtr fn3,
VaListFnPtr2 fn4,
struct Interface_______i32_______va_list fn5,
struct Interface_______i32 fn6);
struct Interface_______i32_______va_list fn6);
10 changes: 3 additions & 7 deletions tests/expectations/va_list_tag.compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@

typedef int32_t (*VaListFnPtr)(va_list);

typedef int32_t (*VaListFnPtr2)(void);
typedef int32_t (*VaListFnPtr2)(va_list);

struct Interface_______i32_______va_list {
int32_t (*fn1)(va_list);
};

struct Interface_______i32 {
int32_t (*fn1)(void);
};

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
Expand All @@ -24,11 +20,11 @@ int32_t va_list_test(va_list ap);
int32_t va_list_test2(va_list ap);

void va_list_fn_ptrs(int32_t (*fn1)(va_list),
int32_t (*fn2)(void),
int32_t (*fn2)(va_list),
VaListFnPtr fn3,
VaListFnPtr2 fn4,
struct Interface_______i32_______va_list fn5,
struct Interface_______i32 fn6);
struct Interface_______i32_______va_list fn6);

#ifdef __cplusplus
} // extern "C"
Expand Down
9 changes: 3 additions & 6 deletions tests/expectations/va_list_tag.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,18 @@ cdef extern from *:

ctypedef int32_t (*VaListFnPtr)(va_list);

ctypedef int32_t (*VaListFnPtr2)();
ctypedef int32_t (*VaListFnPtr2)(va_list);

cdef struct Interface_______i32_______va_list:
int32_t (*fn1)(va_list);

cdef struct Interface_______i32:
int32_t (*fn1)();

int32_t va_list_test(va_list ap);

int32_t va_list_test2(va_list ap);

void va_list_fn_ptrs(int32_t (*fn1)(va_list),
int32_t (*fn2)(),
int32_t (*fn2)(va_list),
VaListFnPtr fn3,
VaListFnPtr2 fn4,
Interface_______i32_______va_list fn5,
Interface_______i32 fn6);
Interface_______i32_______va_list fn6);

0 comments on commit 39bd9ac

Please sign in to comment.