MOO-cows Mailing List Archive
[email@example.com: Re: Server Improvement]
------- Start of forwarded message -------
Date: Tue, 18 Mar 1997 07:03:41 PST
From: chris <firstname.lastname@example.org>
To: MOO-COWs <email@example.com>
Subject: Re: Server Improvement
Content-Type: TEXT/PLAIN; charset=US-ASCII
> So you want:
> void* (int, int, int, ...) FunctionArray;
> (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 -------
Subject Index |