File: common.h

package info (click to toggle)
interface99 1.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 324 kB
  • sloc: ansic: 951; sh: 48; makefile: 6
file content (32 lines) | stat: -rw-r--r-- 838 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef INTERFACE99_TESTS_COMMON_H
#define INTERFACE99_TESTS_COMMON_H

#include <interface99.h>

#include <stddef.h>

// Interfaces {

#define Marker_IFACE

#define Foo_IFACE vfunc(const char *, foo, int x, double *restrict y)

#define Bar_IFACE                                                                                  \
    vfunc(const char *, foo, int x, double *restrict y)                                            \
    vfunc(float, bar, long long x)

interface(Marker);
interface(Foo);
interface(Bar);
// } (Interfaces)

const char *foo1_impl(int x, double *restrict y);
float bar1_impl(long long x);

const char *foo2_impl(int x, double *restrict y);
float bar2_impl(long long x);

typedef const char *(*FooOpType)(int x, double *restrict y);
typedef float (*BarOpType)(long long x);

#endif // INTERFACE99_TESTS_COMMON_H