Mercurial > pub > dyncall > dyncall
comparison test/suite/case.c @ 604:90dfdac91b9b
- cleanups, made some arrays local to TUs, etc.
author | Tassilo Philipp |
---|---|
date | Wed, 21 Sep 2022 14:36:44 +0200 |
parents | e2899b4ff713 |
children | 85b7a117b807 |
comparison
equal
deleted
inserted
replaced
603:c1208587091c | 604:90dfdac91b9b |
---|---|
27 | 27 |
28 #include "../../dyncall/dyncall.h" | 28 #include "../../dyncall/dyncall.h" |
29 #include "config.h" | 29 #include "config.h" |
30 #include "../../dyncall/dyncall_value.h" | 30 #include "../../dyncall/dyncall_value.h" |
31 | 31 |
32 DCValue mValue[NARGS]; | 32 static DCValue mValue[NARGS]; |
33 | 33 |
34 void clearValues() { int i; for(i=0; i<NARGS; ++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; } | 34 void clearValues() { int i; for(i=0; i<NARGS; ++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; } |
35 | 35 |
36 void g_DCbool (DCbool value, int pos) { mValue[pos].B = value; } | 36 void g_DCbool (DCbool value, int pos) { mValue[pos].B = value; } |
37 void g_DCchar (DCchar value, int pos) { mValue[pos].c = value; } | 37 void g_DCchar (DCchar value, int pos) { mValue[pos].c = value; } |
86 #define VF8( id,A1,A2,A3,A4,A5,A6,A7,A8, S) (void(*)())(S), | 86 #define VF8( id,A1,A2,A3,A4,A5,A6,A7,A8, S) (void(*)())(S), |
87 #define VF9( id,A1,A2,A3,A4,A5,A6,A7,A8,A9, S) (void(*)())(S), | 87 #define VF9( id,A1,A2,A3,A4,A5,A6,A7,A8,A9, S) (void(*)())(S), |
88 #define VF10(id,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,S) (void(*)())(S), | 88 #define VF10(id,A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,S) (void(*)())(S), |
89 | 89 |
90 typedef void (*fp)(); | 90 typedef void (*fp)(); |
91 fp gFuncTable[] = { | 91 static fp gFuncTable[] = { |
92 #include "case.h" | 92 #include "case.h" |
93 }; | 93 }; |
94 | 94 |
95 DCpointer getFunc(int x) { | 95 DCpointer getFunc(int x) { |
96 return (DCpointer)gFuncTable[x]; | 96 return (DCpointer)gFuncTable[x]; |
97 } | 97 } |
98 |