comparison test/callback_suite/env.h @ 487:d8f0e6cecdab

- simplified test/callback_suite
author Tassilo Philipp
date Fri, 18 Mar 2022 09:47:18 +0100
parents f5577f6bf97a
children
comparison
equal deleted inserted replaced
486:d160046da104 487:d8f0e6cecdab
22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 22 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 23
24 */ 24 */
25 25
26 #include "dyncall_value.h" 26 #include "dyncall_value.h"
27 #include "dyncall_value_set.h" 27 #include "_auto_config.h"
28
29
30 #define DEF_NON_VOID_TYPES \
31 X(B,DCbool) \
32 X(c,DCchar) X(C,DCuchar) X(s,DCshort) X(S,DCushort) \
33 X(i,DCint) X(I,DCuint) X(j,DClong) X(J,DCulong) \
34 X(l,DClonglong) X(L,DCulonglong) \
35 X(f,DCfloat) X(d,DCdouble) \
36 X(p,DCpointer) X(Z,DCpointer)
37
38 #define DEF_TYPES \
39 X(v,DCvoid) \
40 DEF_NON_VOID_TYPES
41
42
43 typedef struct DCValueSet_
44 {
45 #define X(CH,T) T CH;
46 DEF_NON_VOID_TYPES
47 #undef X
48 } DCValueSet;
49
28 50
29 /* test related */ 51 /* test related */
30 52
31 void InitEnv(); /* initializes ValueMatrix */ 53 void InitEnv(); /* initializes ValueMatrix */
32 54
34 /* function of type and position */ 56 /* function of type and position */
35 void GetReferenceArg(DCValue* output, char type, int argpos); 57 void GetReferenceArg(DCValue* output, char type, int argpos);
36 /* function of type (position = -1) */ 58 /* function of type (position = -1) */
37 void GetReferenceResult(DCValue* output, char type); 59 void GetReferenceResult(DCValue* output, char type);
38 60
39 extern DCValueSet ValueMatrix[CONFIG_MAXARGS]; 61 extern DCValueSet ValueMatrix[CONFIG_MAXARGS];
40 extern DCValue Args[CONFIG_MAXARGS];
41 extern DCValue Result;
42 62
43 /* Global Options. */ 63 /* Global Options. */
44 extern int OptionVerbose; 64 extern int OptionVerbose;
45 65
46 66