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

Nikos nikoskaragiannakis at gmail.com
Sun Jul 29 18:14:31 UTC 2018


>
> Eg turn this into a function and try wrapping this instead:
>
>     auto intp = interpreter(dmdEngine());

Actually, I manage to export the `interpret` method

> export:
>     auto intp(char[] txt) {
>         return interpreter(dmdEngine()).interpret(txt);
>     }

and tested it in ipython successfully.

But when I try to export the whole dmdEngine

> export:
>
>    auto engine(char[] txt) {
>            return interpreter(dmdEngine());
>    }

it complains about copying Interpreter!(DMDEngine).Interpreter

> ../../../.dub/packages/pyd-master/pyd/infrastructure/pyd/make_object.d(249,30): Error: struct drepl.interpreter.Interpreter!(DMDEngine).Interpreter is not copyable because it is annotated with @disable

I removed @disable, but then complained about accessing the 
members `_engine` and `_incomplete` in Interpreter 
(https://github.com/dlang-community/drepl/blob/master/src/drepl/interpreter.d#L147-L148)

> ../../../.dub/packages/pyd-master/pyd/infrastructure/pyd/struct_wrap.d-mixin-56(56,15): Deprecation: std.array.Appender!(char[]).Appender._data is not visible from module ../../../.dub/packages/pyd-master/pyd/infrastructure/pyd/struct_wrap.d-mixin-56(56,15): Error: struct std.array.Appender!(char[]).Appender member _data is not accessible

After I made those public, it complained about `Appender`

> ../../../.dub/packages/pyd-master/pyd/infrastructure/pyd/struct_wrap.d-mixin-56(56,15): Deprecation: std.array.Appender!(char[]).Appender._data is not visible from module
> ../../../.dub/packages/pyd-master/pyd/infrastructure/pyd/struct_wrap.d-mixin-56(56,15): Error: struct std.array.Appender!(char[]).Appender member _data is not accessible

Is there something I can do here or would it better to talk to 
the Drepl guys?

Thank you


More information about the Digitalmars-d-announce mailing list