D and Secure Programming
Manu via Digitalmars-d
digitalmars-d at puremagic.com
Sun Oct 2 22:06:48 PDT 2016
On 3 October 2016 at 13:50, Jacob via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> import std.stdio;
>
> struct SomeStruct
> {
> int value;
>
> void func()
> {
> writeln(value);
> }
>
> }
>
> void main()
> {
> SomeStruct someStruct;
> someStruct.value = 333;
>
> auto func = cast(void function(ref SomeStruct))&SomeStruct.func;
>
> func(someStruct);
> }
>
> Has worked so far for me.
Some ABI's work. D would have to define that all methods use cdecl and
eject 'thiscall' into space, which would be cool.
More information about the Digitalmars-d
mailing list