[DGD] kfun.h and kfuns for function pointers

bart at wotf.org bart at wotf.org
Wed Aug 14 15:39:43 CEST 2013


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'.

The obvious solution would be to change the related FUNCDEFs in kfun/std.c to replace 
the .  with an underscore, and change the 3 places in comp/compile.c from which this* is 
used.

However, noting how Felix typically has a well considered reason for doing things in a 
specific way, I wonder if the obvious solution is also the proper solution or if the 
preprocessor should be changed to allow the use of a dot in this way.

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.

Bart
--
http://www.flickr.com/photos/mrobjective/
http://www.om-d.org/




More information about the DGD mailing list