Compiling kjBuckets for Win32 & Python20

Laurent Szyster l.szyster at ibm.net
Tue Oct 24 08:15:26 EDT 2000


Tom wrote:
> 
> For the following line (#160):
>
> 	enum GState { UNKNOWN, FREE, ROOT, OVERFLOW };
>
> What are these constants?  Only OVERFLOW is defined on my system.
> The compiler reports: "syntax error : 'constant'".

Probably GCC automagically assign values to constants declared
in an enum. So,

	enum GState { UNKNOWN, FREE, ROOT, OVERFLOW };

should be expanded to:

	enum GState { UNKNOWN=0, FREE=1, ROOT=2, OVERFLOW=3 };

as it is explicitely stated in the line #163:

	enum BucketFlag { SETFLAG=0, DICTFLAG=1, GRAPHFLAG=2 };


Laurent Szyster



More information about the Python-list mailing list