annotate test/callback_suite_aggrs/cases.c @ 523:cd46e111bc4c

- new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
author Tassilo Philipp
date Wed, 13 Apr 2022 14:59:57 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
523
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
1 /*
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
2
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
3 Package: dyncall
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
4 Library: test
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
5 File: test/callback_suite_aggrs/cases.c
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
6 Description:
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
7 License:
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
8
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
9 Copyright (c) 2022 Tassilo Philipp <tphilipp@potion-studios.com>
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
10
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
11 Permission to use, copy, modify, and distribute this software for any
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
12 purpose with or without fee is hereby granted, provided that the above
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
13 copyright notice and this permission notice appear in all copies.
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
14
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
15 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
16 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
17 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
18 ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
19 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
20 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
21 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
22
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
23 */
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
24
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
25 #include "globals.h"
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
26
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
27 #define write_V_v(X, v) ( v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
28 #define write_V_B(X, v) (V_B[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
29 #define write_V_c(X, v) (V_c[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
30 #define write_V_s(X, v) (V_s[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
31 #define write_V_i(X, v) (V_i[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
32 #define write_V_j(X, v) (V_j[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
33 #define write_V_l(X, v) (V_l[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
34 #define write_V_C(X, v) (V_C[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
35 #define write_V_S(X, v) (V_S[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
36 #define write_V_I(X, v) (V_I[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
37 #define write_V_J(X, v) (V_J[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
38 #define write_V_L(X, v) (V_L[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
39 #define write_V_p(X, v) (V_p[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
40 #define write_V_f(X, v) (V_f[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
41 #define write_V_d(X, v) (V_d[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
42 #define write_V_a(X, v, t) (*(t*)V_a[X] = v);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
43
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
44 #define v void
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
45 #define X(CH,T) typedef T CH;
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
46 DEF_TYPES
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
47 #undef X
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
48
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
49
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
50 #define AF(c,t,i,n) dcAggrField(a,c,offsetof(t,i),n);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
51 #define AFa(t,i,n,f) dcAggrField(a,DC_SIGCHAR_AGGREGATE,offsetof(t,i),n,f_touch##f());
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
52
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
53 #include "dyncall.h"
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
54 #include <string.h>
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
55
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
56
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
57 /* Plan9 pcc and MSVC (when using C) do not allow empty structs */
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
58 #if defined(DC__C_MSVC) || defined(DC__OS_Plan9)
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
59 # include "nonemptyaggrs.h"
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
60 #else
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
61 # include "cases.h"
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
62 #endif
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
63
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
64 int G_ncases = sizeof(G_sigtab)/sizeof(G_sigtab[0]);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
65 int G_naggs = sizeof(G_agg_sigs)/sizeof(G_agg_sigs[0]);
cd46e111bc4c - new test/callback_suite_aggrs (currently ahead of checked-in dyncall code and won't compile, though, as with call_suite_aggrs; dc code will be checked in, soon)
Tassilo Philipp
parents:
diff changeset
66