summaryrefslogtreecommitdiff
path: root/docs/examples/tutorial/clibraries/queue2.pyx
blob: 9278fbf4b880d56cfec87318258883956406f3c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
# queue.pyx

cimport cqueue

cdef class Queue:
    cdef cqueue.Queue* _c_queue

    def __cinit__(self):
        self._c_queue = cqueue.queue_new()
        if self._c_queue is NULL:
            raise MemoryError()