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.

19 lines
386 B

4 years ago
  1. from libc.stdint cimport int64_t
  2. from cymem.cymem cimport Pool
  3. from .maps cimport MapStruct
  4. from .maps cimport map_init, map_get, map_set
  5. from .maps cimport key_t
  6. ctypedef int64_t count_t
  7. cdef class PreshCounter:
  8. cdef Pool mem
  9. cdef MapStruct* c_map
  10. cdef public object smoother
  11. cdef readonly count_t total
  12. cpdef int inc(self, key_t key, count_t inc) except -1