On Jun 8, 2011, at 11:56 AM, Kevin Jones wrote:

> Comments and explanations inline below.
> 
> --- On Wed, 6/8/11, Julian Leviston <jul...@leviston.net> wrote:
> 
> Also, what is this?
> 
> struct vtable *_vt[0];
> 
> Is that creating a pointer to a struct array which has zero elements in it? I 
> don't follow what that's for?
> 
> This is an idiom in C for variable-length arrays when at the end of a struct 
> definition.
> 

Thanks Kevin,

Can you elaborate a bit more on this idiom?  Is it purely intention-revealing 
code, to signify that it's a pointer to an array of structs instead of a single 
struct?  In other words, does it compile to the same thing as "struct vtable 
*_vt;" ?  

Cheers,
Josh


_______________________________________________
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc

Reply via email to