[DGD]Sizeof arrays...

Jason Cone jcone at uscdev.com
Wed Jun 20 15:44:03 CEST 2001


> -----Original Message-----
> From: Michael J. Bacon [mailto:mj.bacon at gte.net]
> Sent: Wednesday, June 20, 2001 8:22 AM
> To: dgd at list.imaginary.com
> Subject: RE: [DGD]Sizeof arrays...
> 
> 
> 	The code:
> 
> 	size = map->size >> 1;
> 	if (map->hashed != NULL)
> 		size += map->hashed->size;
> 
> 	produces the following error...
> 
> .\extensions.c(788) : error C2037: left of 'size' specifies undefined
> struct/union '_maphash_'
> 
> 
> 	Line 788 is "size += map->hashed->size" - Do I need to 
> include something to
> make this work?


Unfortunately, the _maphash_ struct is defined in array.c.  There are also
several other dependant structs defined in the same file (_meltchunk_ &
_mapelt_ being 2 of the more obvious ones).  Perhaps Dworkin would like to
comment on the necessity of the "if (map->hashed != NULL) size +=
map->hashed->size;" block of code?  If it is indeed necessary, is there a
reason why the needed data structures are defined in such a way that 3rd
party libraries (extensions) can not use them?

JC

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list