summaryrefslogtreecommitdiffstats
path: root/test cases/cython/1 basic/libdir/storer.c
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/cython/1 basic/libdir/storer.c')
-rw-r--r--test cases/cython/1 basic/libdir/storer.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/test cases/cython/1 basic/libdir/storer.c b/test cases/cython/1 basic/libdir/storer.c
new file mode 100644
index 0000000..0199bb8
--- /dev/null
+++ b/test cases/cython/1 basic/libdir/storer.c
@@ -0,0 +1,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;
+}