Mercurial > pub > dyncall > dyncall
diff test/call_suite/globals.c @ 429:2b708397bba1
- simplified and decluttered test/call_suite
author | Tassilo Philipp |
---|---|
date | Mon, 17 Jan 2022 11:36:09 +0100 |
parents | f5577f6bf97a |
children | 8e22b70d3ee4 |
line wrap: on
line diff
--- a/test/call_suite/globals.c Mon Jan 17 10:25:33 2022 +0100 +++ b/test/call_suite/globals.c Mon Jan 17 11:36:09 2022 +0100 @@ -27,7 +27,7 @@ #include "globals.h" #include <float.h> -#define X(CH,T,QCH) T *V_##CH; T *K_##CH; +#define X(CH,T) T *V_##CH; T *K_##CH; DEF_TYPES #undef X @@ -38,7 +38,7 @@ void init_K() { int i; -#define X(CH,T,QCH) V_##CH = (T*) malloc(sizeof(T)*(G_maxargs+1)); K_##CH = (T*) malloc(sizeof(T)*(G_maxargs+1)); +#define X(CH,T) V_##CH = (T*) malloc(sizeof(T)*(G_maxargs+1)); K_##CH = (T*) malloc(sizeof(T)*(G_maxargs+1)); DEF_TYPES #undef X for(i=0;i<G_maxargs+1;++i) { @@ -48,7 +48,7 @@ K_j[i] = (long) (((rand_d()-0.5)*2) * (1L<<(sizeof(long)*8-2))); K_l[i] = (long long) (((rand_d()-0.5)*2) * (1LL<<(sizeof(long long)*8-2))); K_p[i] = (void*) (long) (((rand_d()-0.5)*2) * (1LL<<(sizeof(void*)*8-1))); - K_f[i] = (float) (rand_d() * FLT_MAX); /* Plan9 doesn't know the macro. */ + K_f[i] = (float) (rand_d() * FLT_MAX); K_d[i] = (double) (((rand_d()-0.5)*2) * 1.7976931348623157E+308/*__DBL_MAX__*/); /* Plan9 doesn't know the macro. */ } } @@ -57,7 +57,7 @@ { int i; for(i=0;i<G_maxargs+1;++i) { -#define X(CH,T,QCH) V_##CH[i] = (T) 0; +#define X(CH,T) V_##CH[i] = (T) 0; DEF_TYPES #undef X }