summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@mailme.dk>2013-02-10 15:39:57 +0100
committerEmil Renner Berthing <esmil@mailme.dk>2013-06-08 19:11:53 +0200
commit118ed4f30e89c9fb0e790c5384f0357d6985a152 (patch)
tree01acb76323a8b5dba54a0d1564610bf9a1f55671
parent067263bb5049d3a5fde10af7eda685b9a0aa7593 (diff)
downloadlem-118ed4f30e89c9fb0e790c5384f0357d6985a152.tar.gz
lem-118ed4f30e89c9fb0e790c5384f0357d6985a152.tar.xz
lem-118ed4f30e89c9fb0e790c5384f0357d6985a152.zip
lem: use reguler ints for queue indexes
-rw-r--r--bin/lem.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/lem.c b/bin/lem.c
index 387cd7f..395dbe8 100644
--- a/bin/lem.c
+++ b/bin/lem.c
@@ -56,10 +56,10 @@ struct lem_runqueue_slot {
struct lem_runqueue {
struct ev_idle w;
- unsigned long first;
- unsigned long last;
- unsigned long mask;
struct lem_runqueue_slot *queue;
+ unsigned int first;
+ unsigned int last;
+ unsigned int mask;
};
#if EV_MULTIPLICITY
@@ -166,11 +166,11 @@ lem_queue(lua_State *T, int nargs)
rq.last++;
rq.last &= rq.mask;
if (rq.first == rq.last) {
- unsigned long i;
- unsigned long j;
+ unsigned int i;
+ unsigned int j;
struct lem_runqueue_slot *new_queue;
- lem_debug("expanding queue to %lu slots", 2*(rq.mask + 1));
+ lem_debug("expanding queue to %u slots", 2*(rq.mask + 1));
new_queue = lem_xmalloc(2*(rq.mask + 1)
* sizeof(struct lem_runqueue_slot));