[DGD] obtaining object in extension system

RobF squaretriangle at hotmail.co.uk
Thu Nov 17 15:55:32 CET 2011


On 17/11/2011 14:18, Felix A. Croes wrote:
> The purpose of lpc-ext is to offer a unified extension interface for
> DGD and Hydra.  If extensions are still going to be incompatible with
> one of them, there isn't much point in using the interface, and you
> might as well hack the DGD sourcecode directly.  The format of kfuns
> in dgd/src/kfun/*.c is likely to remain stable in the future, so there
> isn't much danger of your code becoming incompatible at this point.
>

I thought compatibility might be the issue.  Certain things 
outprioritise other things.  A pity it meant nerfing the extension 
interface.

I similarly have a priority that my lib and the functions it depends 
upon work 'out of the box' on an unmodified dgd build (that links an 
extension module), so hacking the source isn't an option I'm comfortable 
with.

I thought of overloading the sprintf extension kfun in the auto object 
and convert objects to string-descriptors if it gets passed any object 
arguments, before passing it to the kfun.  But that wouldn't work if the 
object is nested in an array value, and so if I'm to scan everything in 
LPC I may as well be implementing the entire sprintf function in LPC, 
since my extension prioritises speed over everything else.

I've decided I'll settle for a reduced sprintf function, and it'll 
insert <object> where previously it would insert the object name.

Is there a designated repository for u/l extensions?  http://dgdhub.org/
is defunct.



More information about the DGD mailing list