G_LOCK_DECLARE -> G_LOCK_DEFINE



Hi,

for reasons already stated(*), I would like to rename G_LOCK_DECLARE to
G_LOCK_DEFINE and get rid of G_LOCK_DECLARE_STATIC. This is done by the
following patch. It does not procude warnings and does not produce extra
code, if glib is configured with `--disable-threads'. It does however
allocate memory for the LOCK with the size of a gpointer each (there are
16 LOCKS used by glib). That sums up to 16 * 4 = 64 Bytes on most systems
and should be acceptable, if you consider the increased coherency.

I could say, that if noone objects, I'll commit this, but I think, thats a
bit unsuited in that special case, so please Owen and Tim, approve or
disapprove this.

BTW.: No software other than glib on the gnome cvs server is using those
macros, so we can still change that, and we should before a release.

(*) K&R and ANSI-C use the term declaration for making an object known to
the program and the term definition for assigning memory for an object.

Bye,
Sebastian
-- 
Sebastian Wilhelmi                   |            här ovanför alla molnen
mailto:wilhelmi@ira.uka.de           |      är himmlen så förunerligt blå
http://goethe.ira.uka.de/~wilhelmi   |



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