aboutsummaryrefslogtreecommitdiffstats
path: root/python/gevent/__ident.pxd
blob: 55e4307816c548e5eaa34baba09957410b8384fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
cimport cython

cdef extern from "Python.h":

    ctypedef class weakref.ref [object PyWeakReference]:
        pass

cdef heappop
cdef heappush
cdef object WeakKeyDictionary
cdef type ref

@cython.internal
@cython.final
cdef class ValuedWeakRef(ref):
    cdef object value

@cython.final
cdef class IdentRegistry:
    cdef object _registry
    cdef list _available_idents

    @cython.final
    cpdef object get_ident(self, obj)
    @cython.final
    cpdef _return_ident(self, ValuedWeakRef ref)