Mercurial > pub > dyncall > dyncall
diff test/callback_suite/globals.h @ 509:f3d44195dbdf
callback_suite:
- further, big refactoring to make the test data setup be a lot more in line with call_suite and call_suite_aggrs
- added support to test void return values (was missing in prev version)
author | Tassilo Philipp |
---|---|
date | Sat, 09 Apr 2022 23:00:24 +0200 |
parents | 049e04af13c8 |
children |
line wrap: on
line diff
--- a/test/callback_suite/globals.h Sat Apr 09 14:44:33 2022 +0200 +++ b/test/callback_suite/globals.h Sat Apr 09 23:00:24 2022 +0200 @@ -23,10 +23,11 @@ */ -#include "dyncall_value.h" + +#include "dyncall_types.h" -#define DEF_NON_VOID_TYPES \ +#define DEF_TYPES \ X(B,DCbool) \ X(c,DCchar) X(C,DCuchar) X(s,DCshort) X(S,DCushort) \ X(i,DCint) X(I,DCuint) X(j,DClong) X(J,DCulong) \ @@ -34,23 +35,9 @@ X(f,DCfloat) X(d,DCdouble) \ X(p,DCpointer) X(Z,DCpointer) -#define DEF_TYPES \ - X(v,DCvoid) \ - DEF_NON_VOID_TYPES - - -typedef struct DCValueSet_ -{ -#define X(CH,T) T CH; -DEF_NON_VOID_TYPES +#define X(CH,T) extern T *K_##CH; extern T *V_##CH; +DEF_TYPES #undef X -} DCValueSet; -extern DCValueSet* ValueMatrix; - -/* arguments filled-in by callback handlers, and return value */ -extern DCValue* Args; -extern DCValue Result; - typedef void (*funptr)(void*); @@ -61,10 +48,5 @@ void init_test_data(); void deinit_test_data(); +void clear_V(); -/* function of type and position */ -void get_reference_arg(DCValue* output, char type, int argpos); -/* function of type (position = -1) */ -void get_reference_result(DCValue* output, char type); - -