[DGD] kfun.h and kfuns for function pointers
Felix A. Croes
felix at dworkin.nl
Wed Aug 14 16:15:53 CEST 2013
bart at wotf.org wrote:
> Looking at how I could determine from lpc if the driver is built with -DCLOSURES, I looked
> at kfun.h and noticed they appear there as #define KF_NEW.FUNCTION etc, which
> apparantly is accepted by the precompiler. However, #ifdef KF_NEW.FUNCTION results in a
> 'bad token in control'.
That is a mistake, conf_includes() should replace the period with an
underscore. The period should remain in the function names, since it
prevents explicit calls to those functions.
>[...]
> Also, I was wondering if ot would be a good idea to let ppcontrol.c add a define similar to
> what it does for the network extensions. This would allow writing code that checks for this
> in a way that is compatible with versions of dgd that didn't create kfun.h yet. Biggest
> objection I can think of is not wanting to clutter the lpc environment with driver provided
> defines.
I'm not in favour of having a predefined macro for this. Just use
operator overloading in your mudlib, and it will only work with DGD
versions that generate kfun.h. :-)
Regards,
Felix Croes
More information about the DGD
mailing list