autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

Nicholas Wilson iamthewilsonator at hotmail.com
Tue Jul 31 09:09:11 UTC 2018


On Sunday, 29 July 2018 at 18:14:31 UTC, Nikos wrote:
> But when I try to export the whole dmdEngine
>
>> export:
>>
>>    auto engine(char[] txt) {
>>            return interpreter(dmdEngine());
>>    }
>


Can you export an instance of `interpreter(dmdEngine())`?

e.g.

__gshared auto dmdi = interpreter(dmdEngine());

export ref dmd()
{
     return dmdi;
}

or if that doesn't work, proxy it

__gshared auto dmdi = interpreter(dmdEngine());

struct Dmd
{
     mixin Proxy!dmdi;
}
export auto dmd()
{
     Dmd d;
     return d;
}

That is pretty much required if you want to maintain state across.

Also I'm working on a D kernel for Jupyter notebook which should 
be done soon.


More information about the Digitalmars-d-announce mailing list