From 41d9e79780dc4aa8b3e0778172885859d55abbf7 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Sun, 16 Nov 2008 20:42:45 +0100 Subject: [PATCH] Fixed 64bit problem with aaValues runtime calls (assumed 32bits) --- dmd/mtype.c | 2 +- dmd2/mtype.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dmd/mtype.c b/dmd/mtype.c index bc65f120..5bcaa9e3 100644 --- a/dmd/mtype.c +++ b/dmd/mtype.c @@ -2419,7 +2419,7 @@ Expression *TypeAArray::dotExp(Scope *sc, Expression *e, Identifier *ident) arguments = new Expressions(); arguments->push(e); size_t keysize = key->size(e->loc); - keysize = (keysize + 4 - 1) & ~(4 - 1); + keysize = (keysize + PTRSIZE - 1) & ~(PTRSIZE - 1); arguments->push(new IntegerExp(0, keysize, Type::tsize_t)); arguments->push(new IntegerExp(0, next->size(e->loc), Type::tsize_t)); e = new CallExp(e->loc, ec, arguments); diff --git a/dmd2/mtype.c b/dmd2/mtype.c index 89f688ec..628a2487 100644 --- a/dmd2/mtype.c +++ b/dmd2/mtype.c @@ -2736,7 +2736,7 @@ Expression *TypeAArray::dotExp(Scope *sc, Expression *e, Identifier *ident) arguments = new Expressions(); arguments->push(e); size_t keysize = index->size(e->loc); - keysize = (keysize + 4 - 1) & ~(4 - 1); + keysize = (keysize + PTRSIZE - 1) & ~(PTRSIZE - 1); arguments->push(new IntegerExp(0, keysize, Type::tsize_t)); arguments->push(new IntegerExp(0, next->size(e->loc), Type::tsize_t)); e = new CallExp(e->loc, ec, arguments);