You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Stas Bekman <st...@stason.org> on 2002/03/15 04:14:21 UTC

better naming for members in struct scoreboard

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/