Mercurial > pub > dyncall > dyncall
comparison test/call_suite_aggrs/cases.c @ 485:0c68b3f91367
- renamed suite_aggrs to call_suite_aggrs for consistency (callback version will be called callback_suite_aggrs)
author | Tassilo Philipp |
---|---|
date | Thu, 17 Mar 2022 15:41:26 +0100 |
parents | test/suite_aggrs/cases.c@0f3b6898078d |
children | 29d09d10ecd9 |
comparison
equal
deleted
inserted
replaced
484:74a4f682d1ef | 485:0c68b3f91367 |
---|---|
1 /* | |
2 | |
3 Package: dyncall | |
4 Library: test | |
5 File: test/call_suite_aggrs/cases.c | |
6 Description: | |
7 License: | |
8 | |
9 Copyright (c) 2022 Tassilo Philipp <tphilipp@potion-studios.com> | |
10 | |
11 Permission to use, copy, modify, and distribute this software for any | |
12 purpose with or without fee is hereby granted, provided that the above | |
13 copyright notice and this permission notice appear in all copies. | |
14 | |
15 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
16 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
17 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
18 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
19 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
20 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
21 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
22 | |
23 */ | |
24 | |
25 #include "globals.h" | |
26 | |
27 #define ret_v(X) | |
28 #define ret_c(X) return(K_c[X]); | |
29 #define ret_s(X) return(K_s[X]); | |
30 #define ret_i(X) return(K_i[X]); | |
31 #define ret_j(X) return(K_j[X]); | |
32 #define ret_l(X) return(K_l[X]); | |
33 #define ret_p(X) return(K_p[X]); | |
34 #define ret_f(X) return(K_f[X]); | |
35 #define ret_d(X) return(K_d[X]); | |
36 #define ret_a(X,t) return(*(t*)K_a[X]); | |
37 | |
38 #define v void | |
39 #define c char | |
40 #define s short | |
41 #define i int | |
42 #define j long | |
43 #define l long long | |
44 #define p void* | |
45 #define f float | |
46 #define d double | |
47 #define a void* /* all generated aggregates */ | |
48 | |
49 #define AF(c,t,i,n) dcAggrField(at,c,offsetof(t,i),n); | |
50 #define AFa(t,i,n,f) dcAggrField(at,DC_SIGCHAR_AGGREGATE,offsetof(t,i),n,f_touchdcst##f()); | |
51 | |
52 #include "dyncall.h" | |
53 #include <string.h> | |
54 | |
55 | |
56 /* Plan9 pcc and MSVC (when using C) do not allow empty structs */ | |
57 #if defined(DC__C_MSVC) || defined(DC__OS_Plan9) | |
58 # include "nonemptystructs.h" | |
59 #else | |
60 # include "cases.h" | |
61 #endif | |
62 | |
63 int G_ncases = sizeof(G_sigtab)/sizeof(G_sigtab[0]); | |
64 int G_naggs = sizeof(G_agg_sigs)/sizeof(G_agg_sigs[0]); | |
65 |