lib/sod-hosted.c (sod_makev): Use two statements rather than tricky expression.
[sod] / test / kwbench-back.c
CommitLineData
118ae0a7
MW
1/* -*-c-*-
2 *
3 * Keyword benchmark, backend
4 *
5 * (c) 2019 Straylight/Edgeware
6 */
7
8/*----- Licensing notice --------------------------------------------------*
9 *
10 * This file is part of the Sensible Object Design, an object system for C.
11 *
12 * SOD is free software: you can redistribute it and/or modify it under
13 * the terms of the GNU General Public License as published by the Free
14 * Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 *
17 * SOD is distributed in the hope that it will be useful, but WITHOUT ANY
18 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with SOD. If not, write to the Free Software Foundation, Inc.,
24 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 */
26
27#include <stdarg.h>
28
29#include "keyword.h"
30#include "kwbench.h"
31
32void kwbench_trivial(struct myobject *obj, int x, int y, int z)
33 { obj->x = x; obj->y = y; obj->z = z; }
34
35#define kwbench_KWSET(_) \
36 _(int, x, 0) \
37 _(int, y, 0) \
38 _(int, z, 0)
39KWSET_STRUCT(kwbench);
40static KWSET_PARSEFN(kwbench)
41KWCALL void kwbench_keywords(struct myobject *obj, KWTAIL)
42{
43 KWPARSE(kwbench);
44 obj->x = kw.x; obj->y = kw.y; obj->z = kw.z;
45}
46
47/*----- That's all, folks -------------------------------------------------*/