[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A query about GNU Make development.

From: Eli Zaretskii
Subject: Re: A query about GNU Make development.
Date: Fri, 25 Jan 2008 12:44:10 +0200

> From: "Shlomi Ben-Zvi" <address@hidden>
> Date: Fri, 25 Jan 2008 10:02:35 -0000
> I am walking through the make-3.81 code and came across the following
> statement in hash.c's hash_init()
> ht->ht_vec = (void**) CALLOC (struct token *, ht->ht_size);
> This works perfectly fine under MS-VS-2005 but I have a problem
> understanding the code - particularly the "struct token *" pointer. What
> does it mean? Can you please help me here?

See the definition of the CALLOC macro earlier in hash.c:

        #define CALLOC(t, n) ((t *) calloc (sizeof (t), (n)))

So the line that you were wondering about is preprocessed into this:

  ht->ht_vec = (void**) calloc (sizeof (struct token *), ht->ht_size);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]