summaryrefslogtreecommitdiffhomepage
path: root/ir/adt
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-09-07 09:06:10 +0200
committerMatthias Braun <matze@braunis.de>2015-09-07 19:58:31 +0200
commit3882eb5c52cb2a3267cf2813a20c1a6e4d8c4c2d (patch)
tree676ab54d5fd80efc79cf276b7666f87aa27bcebe /ir/adt
parent6e874e282f08f5694107009560965409125d7ed3 (diff)
pdeq: Add more const
Diffstat (limited to 'ir/adt')
-rw-r--r--ir/adt/pdeq.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/ir/adt/pdeq.c b/ir/adt/pdeq.c
index e19754e..f9f9271 100644
--- a/ir/adt/pdeq.c
+++ b/ir/adt/pdeq.c
@@ -130,18 +130,18 @@ void del_pdeq(pdeq *dq)
} while ((q = qq) != NULL);
}
-int pdeq_empty(pdeq *dq)
+int pdeq_empty(pdeq const *dq)
{
VRFY(dq);
return dq->l_end->n == 0;
}
-size_t pdeq_len(pdeq *dq)
+size_t pdeq_len(pdeq const *dq)
{
VRFY(dq);
- size_t n = 0;
- pdeq *q = dq->l_end;
+ size_t n = 0;
+ pdeq const *q = dq->l_end;
do {
n += q->n;
q = q->r;
@@ -273,11 +273,11 @@ void *pdeq_getl(pdeq *dq)
return (void *)x;
}
-int pdeq_contains(pdeq *dq, void const *x)
+int pdeq_contains(pdeq const *dq, void const *x)
{
VRFY(dq);
- pdeq *q = dq->l_end;
+ pdeq const *q = dq->l_end;
do {
size_t p = q->p;
size_t ep = p + q->n;
@@ -302,11 +302,11 @@ int pdeq_contains(pdeq *dq, void const *x)
return false;
}
-void *pdeq_search(pdeq *dq, cmp_fun cmp, void const *key)
+void *pdeq_search(pdeq const *dq, cmp_fun cmp, void const *key)
{
VRFY(dq);
- pdeq *q = dq->l_end;
+ pdeq const *q = dq->l_end;
do {
size_t p = q->p;
size_t ep = p + q->n;
@@ -331,12 +331,12 @@ void *pdeq_search(pdeq *dq, cmp_fun cmp, void const *key)
return NULL;
}
-void **pdeq_copyl(pdeq *dq, void const **dst)
+void **pdeq_copyl(pdeq const *dq, void const **dst)
{
VRFY(dq);
void const **d = dst;
- pdeq *q = dq->l_end;
+ pdeq const *q = dq->l_end;
while (q != NULL) {
size_t p = q->p;
size_t n = q->n;
@@ -356,11 +356,11 @@ void **pdeq_copyl(pdeq *dq, void const **dst)
return (void **)dst;
}
-void **pdeq_copyr(pdeq *dq, void const **dst)
+void **pdeq_copyr(pdeq const *dq, void const **dst)
{
VRFY(dq);
- pdeq *q = dq->r_end;
+ pdeq const *q = dq->r_end;
void const **d = dst;
while (q != NULL) {
size_t p = q->p;