annotate cy_works/cqu.pxd @ 68:eb91fd5d49b3

minimally changed to get Cython Queue example working, Cython version
author Henry S Thompson <ht@inf.ed.ac.uk>
date Fri, 17 Jan 2025 15:43:56 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
68
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
1 cdef extern from "c-algorithms/src/queue.h":
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
2 ctypedef struct Queue:
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
3 pass
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
4 ctypedef void* QueueValue
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
5
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
6 Queue* queue_new()
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
7 void queue_free(Queue* queue)
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
8
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
9 int queue_push_head(Queue* queue, QueueValue data)
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
10 QueueValue queue_pop_head(Queue* queue)
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
11 QueueValue queue_peek_head(Queue* queue)
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
12
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
13 int queue_push_tail(Queue* queue, QueueValue data)
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
14 QueueValue queue_pop_tail(Queue* queue)
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
15 QueueValue queue_peek_tail(Queue* queue)
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
16
eb91fd5d49b3 minimally changed to get Cython Queue example working, Cython version
Henry S Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
17 bint queue_is_empty(Queue* queue)