From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- meson/test cases/cython/1 basic/libdir/storer.pyx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 meson/test cases/cython/1 basic/libdir/storer.pyx (limited to 'meson/test cases/cython/1 basic/libdir/storer.pyx') diff --git a/meson/test cases/cython/1 basic/libdir/storer.pyx b/meson/test cases/cython/1 basic/libdir/storer.pyx new file mode 100644 index 000000000..ed551dc5f --- /dev/null +++ b/meson/test cases/cython/1 basic/libdir/storer.pyx @@ -0,0 +1,16 @@ +cimport cstorer + +cdef class Storer: + cdef cstorer.Storer* _c_storer + + def __cinit__(self): + self._c_storer = cstorer.storer_new() + + def __dealloc__(self): + cstorer.storer_destroy(self._c_storer) + + cpdef int get_value(self): + return cstorer.storer_get_value(self._c_storer) + + cpdef set_value(self, int value): + cstorer.storer_set_value(self._c_storer, value) -- cgit 1.2.3-korg