[DGD]Precompile Interface

Felix A. Croes felix at dworkin.nl
Tue Aug 10 21:01:29 CEST 1999


On Mon, 9 Aug 1999 balduin at uni-paderborn.de wrote:

> Mostly for performance reasons, i want to implement some functions
> in C instead of lpc. But I don't want to have them as kfun's in 
> the driver, instead i'd like to inherit them like i do with my
> lpc stuff. When looking at the C sources of the dgd precompiler, i
> noticed the similarity of this code with the code of kfuns. All what
> is addded seems to be a TAG and some statistics and tables like
> "funcdefs","funcalls" and "symbols".
> 
> Here are my questions now:
> - Is there a way to provide theese tables to successfully fake a C
>   file for use with the precompiled interface ? If yes, how can I 
>   do that ?

The easiest way to do that is to create empty functions in LPC and
precompile them, filling in the function bodies in the C code
later.


> - How can I prohibit destruction of such "faked" precompiled files.
>   Since I don't want to provide an lpc source, I can't allow update
>   or upgrade to new versions of such code. (Of cource i can always
>   provide a list of theese files and check on library level, but is
>   there an alternative solution?)

Destruction code typically has a prolog in a mudlib, so I would
suggest blocking this in the mudlib to ensure that the destruction
prolog isn't executed while the destruction itself fails.


> p.s. Is there a totally different way to create C files which can 
> be inherited from lpc ?

It may be easier to implement as kfuns that can only be executed
by a specific object, which may then be inherited.

Regards,
Dworkin


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list