MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

[kirkc6@cs.man.ac.uk: Re: Server Improvement]



------- Start of forwarded message -------
Return-Path: moo-cows-errors@parc.xerox.com
Date: Tue, 18 Mar 1997 07:03:41 PST
From: chris <kirkc6@cs.man.ac.uk>
X-Sender: kirkc6@t9
To: MOO-COWs <moo-cows@parc.xerox.com>
Subject: Re: Server Improvement
In-Reply-To: <libSDtMail.9703181254.21382.mark@darkhorse/darkhorse>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: MOO-Cows-Errors@parc.xerox.com
Precedence: bulk

> So you want:
> 
> void* (int, int, int, ...) FunctionArray[100];
> :
> (FunctionArray[command])(arg1, arg2, arg3, ...);
> 
> Which would be fine, if every single function you call uses exactly the same 
> arguements in the same order in each case.  If not you either have to 
> special-case those entries, or build a wrapper function for it.  Plus you have 
> to assume they'll all return the same type, and that everything they do that 
> differs from all the others will be handled within that function.  Then whenever 
> you have to add a new command, you have to go through the whole process of 
> generating a matching function, which could heavily restrict it's abilities, or 
> recode all the others to match...
>
Guess what, from my understanding of the server code every function in 
the array needs identical arguements.
- -ie pass value of void, and return value of void.
Everything is stored on the stack (so perhaps in practice the function 
will need a pointer or two for arguements).
 
------- End of forwarded message -------


Home | Subject Index | Thread Index