tech-kern archive

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

Re: Some changes to autoconfiguration APIs



> Also, is there some way to distinguish an integer valued attribute
> which is explicitly set to 0 from one which isn't set at all

Not using the initialized-struct paradigm; there is no way to tell the
difference between
	(struct foo){...no mention of y...}
and
	(struct foo){y=0, ...no mention of y...}
because they compile to the same bits.

This is actually an advantage of the method I sketched upthread of
using no-op functions for type-checking with a varargs API function:
"not provided" can be handled differently from "provided" regardless of
the value provided.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index