# HG changeset patch # User Christian Kamm # Date 1232280619 -3600 # Node ID ea82e2077f9d30d4d791decd7e237d0dfc5b4152 # Parent 5a03f3f746157ea4415a51d0a4729b4ca4ff2f08 Change custom allocator new size argument to size_t instead of uint. See #175. diff -r 5a03f3f74615 -r ea82e2077f9d dmd/expression.c --- a/dmd/expression.c Sat Jan 17 17:52:09 2009 +0100 +++ b/dmd/expression.c Sun Jan 18 13:10:19 2009 +0100 @@ -3617,8 +3617,8 @@ if (cd->aggNew) { - // Prepend the uint size argument to newargs[] - Expression *e = new IntegerExp(loc, cd->size(loc), Type::tuns32); + // Prepend the size_t size argument to newargs[] + Expression *e = new IntegerExp(loc, cd->size(loc), Type::tsize_t); if (!newargs) newargs = new Expressions(); newargs->shift(e); diff -r 5a03f3f74615 -r ea82e2077f9d dmd/func.c --- a/dmd/func.c Sat Jan 17 17:52:09 2009 +0100 +++ b/dmd/func.c Sun Jan 18 13:10:19 2009 +0100 @@ -2818,13 +2818,13 @@ TypeFunction *tf = (TypeFunction *)type; if (Argument::dim(tf->parameters) < 1) { - error("at least one argument of type uint expected"); + error("at least one argument of type size_t expected"); } else { Argument *a = Argument::getNth(tf->parameters, 0); - if (!a->type->equals(Type::tuns32)) - error("first argument must be type uint, not %s", a->type->toChars()); + if (!a->type->equals(Type::tsize_t)) + error("first argument must be type size_t, not %s", a->type->toChars()); } FuncDeclaration::semantic(sc);