aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/cython/1 basic/libdir/storer.c
blob: 0199bb850eabd5f1634db4cea14b5bae4b5f6525 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include"storer.h"
#include<stdlib.h>

struct _Storer {
    int value;
};

Storer* storer_new() {
    Storer *s = malloc(sizeof(struct _Storer));
    s->value = 0;
    return s;
}

void storer_destroy(Storer *s) {
    free(s);
}

int storer_get_value(Storer *s) {
    return s->value;
}

void storer_set_value(Storer *s, int v) {
    s->value = v;
}