The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
350 B
25 lines
350 B
9 years ago
|
#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;
|
||
|
}
|