comparison dmd/func.c @ 891:ea82e2077f9d

Change custom allocator new size argument to size_t instead of uint. See #175.
author Christian Kamm <kamm incasoftware de>
date Sun, 18 Jan 2009 13:10:19 +0100
parents 330f999ade44
children 6c09179ebba0
comparison
equal deleted inserted replaced
890:5a03f3f74615 891:ea82e2077f9d
2816 2816
2817 // Check that there is at least one argument of type uint 2817 // Check that there is at least one argument of type uint
2818 TypeFunction *tf = (TypeFunction *)type; 2818 TypeFunction *tf = (TypeFunction *)type;
2819 if (Argument::dim(tf->parameters) < 1) 2819 if (Argument::dim(tf->parameters) < 1)
2820 { 2820 {
2821 error("at least one argument of type uint expected"); 2821 error("at least one argument of type size_t expected");
2822 } 2822 }
2823 else 2823 else
2824 { 2824 {
2825 Argument *a = Argument::getNth(tf->parameters, 0); 2825 Argument *a = Argument::getNth(tf->parameters, 0);
2826 if (!a->type->equals(Type::tuns32)) 2826 if (!a->type->equals(Type::tsize_t))
2827 error("first argument must be type uint, not %s", a->type->toChars()); 2827 error("first argument must be type size_t, not %s", a->type->toChars());
2828 } 2828 }
2829 2829
2830 FuncDeclaration::semantic(sc); 2830 FuncDeclaration::semantic(sc);
2831 } 2831 }
2832 2832