httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject better naming for members in struct scoreboard
Date Fri, 15 Mar 2002 03:14:21 GMT
I've written a bunch of accessors/manipulators for the scoreboard and I 
must say that there is a "logical" mismatch between types used in 
'struct scoreboard' and the corresponding struct member names. It's such 
a mess when you have to use these a lot :(

Currently we have:

typedef struct {
      global_score *global;
      process_score *parent;
      worker_score **servers;
} scoreboard;

I suggest:

typedef struct {
      global_score *global;
      parent_score *parent;
      worker_score **workers;
} scoreboard;

more over 'parent_score *parent' is a pointer to an array, why is it 
called 'parent'
and not 'parents'?

Therefore my ideal vision of a logical naming for struct scoreboard is:

typedef struct {
      global_score *global;
      parent_score *parents;
      worker_score **workers;
} scoreboard;

If we can change these that would make the work of those (me) using the
scoreboard struct a much easier and error prone task.

If I'm not mistaken it's an easy search-n-replace in the scoreboard.[hc] 
and mod_status.c.

Thanks!

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Mime
View raw message