[GRASS-dev] The "nature" of size_t

Wolf Bergenheim wolf+grass at bergenheim.net
Tue Mar 27 06:31:58 EDT 2007


What? No it doesn't. How do you figure it expects a signed integer?

The definition of G_calloc doesn't have anything to do with how the
compiler thinks it is. Have you redefined G_calloc somewhere? If you
declare in your own file G_calloc(unsigned int, unsigned int); Then the
compiler will think that G_calloc expects two unsigned integers, no
matter how it is really in alloc.c, since the compiler will not look in
alloc.c when compiling your stuff.

--Wolf

On 27.03.2007 12:42, Damiano Triglione wrote:
> Hi,
> I am still trying to understand the "nature" of size_t.
> If I am not wrong, it is equivalent to the unsigned integral type of the
> result of "sizeof". E.g. in my 32-bit processor PC, it is equal to 4.
> But G_calloc() expects - as first argument - a SIGNED (not unsigned)
> parameter, even if in alloc.c I find that the first argument of G_calloc
> has type size_t !
> Can anyone, please, help me tu figure out?
> Thanks,
> Damiano
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev

-- 

<:3 )---- Wolf Bergenheim ----( 8:>




More information about the grass-dev mailing list