Mercurial > pub > dyncall > dyncall
comparison test/suite2_x86win32std/case.cc @ 604:90dfdac91b9b
- cleanups, made some arrays local to TUs, etc.
author | Tassilo Philipp |
---|---|
date | Wed, 21 Sep 2022 14:36:44 +0200 |
parents | f5577f6bf97a |
children | 85b7a117b807 |
comparison
equal
deleted
inserted
replaced
603:c1208587091c | 604:90dfdac91b9b |
---|---|
34 #define API __attribute__((stdcall)) | 34 #define API __attribute__((stdcall)) |
35 #else | 35 #else |
36 #define API __stdcall | 36 #define API __stdcall |
37 #endif | 37 #endif |
38 | 38 |
39 DCValue mValue[MAXARGS]; | 39 static DCValue mValue[MAXARGS]; |
40 | 40 |
41 void clearValues() { for(int i = 0;i<MAXARGS;++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; } | 41 void clearValues() { for(int i = 0;i<MAXARGS;++i) mValue[i].L = 0xCAFEBABEDEADC0DEULL; } |
42 | 42 |
43 template<typename T> void g(T value, int pos); | 43 template<typename T> void g(T value, int pos); |
44 | 44 |
45 template<> void g(DCchar value, int pos) { mValue[pos].c = value; } | 45 template<> void g(DCchar value, int pos) { mValue[pos].c = value ; } |
46 template<> void g(DCshort value, int pos) { mValue[pos].s = value; } | 46 template<> void g(DCshort value, int pos) { mValue[pos].s = value ; } |
47 template<> void g(DCint value, int pos) { mValue[pos].i = value; } | 47 template<> void g(DCint value, int pos) { mValue[pos].i = value ; } |
48 template<> void g(DCpointer value, int pos) { mValue[pos].p = value; } | 48 template<> void g(DCpointer value, int pos) { mValue[pos].p = value ; } |
49 template<> void g(DClong value, int pos) { mValue[pos].l = value; } | 49 template<> void g(DClong value, int pos) { mValue[pos].l = value ; } |
50 template<> void g(DClonglong value, int pos) { mValue[pos].L = value; } | 50 template<> void g(DClonglong value, int pos) { mValue[pos].L = value ; } |
51 template<> void g(DCfloat value, int pos) { mValue[pos].f = value; } | 51 template<> void g(DCfloat value, int pos) { mValue[pos].f = value ; } |
52 template<> void g(DCdouble value, int pos) { mValue[pos].d = value; } | 52 template<> void g(DCdouble value, int pos) { mValue[pos].d = value ; } |
53 | 53 |
54 DCValue* getArg(int pos) { return &mValue[pos]; } | 54 DCValue* getArg(int pos) { return &mValue[pos]; } |
55 | 55 |
56 int gID; | 56 int gID; |
57 int getId() { return gID; } | 57 int getId() { return gID; } |
132 | 132 |
133 #include "case.h" | 133 #include "case.h" |
134 | 134 |
135 }; | 135 }; |
136 | 136 |
137 | |
138 |