storer.pyx 401 B

1234567891011121314151617
  1. cimport cstorer
  2. cdef class Storer:
  3. cdef cstorer.Storer* _c_storer
  4. def __cinit__(self):
  5. self._c_storer = cstorer.storer_new()
  6. def __dealloc__(self):
  7. cstorer.storer_destroy(self._c_storer)
  8. cpdef int get_value(self):
  9. return cstorer.storer_get_value(self._c_storer)
  10. cpdef set_value(self, int value):
  11. cstorer.storer_set_value(self._c_storer, value)