On 08/10/2017 01:52 AM, Johnson Jones wrote:
I've tried

                                             import gdk.Threads;
alias DD = static extern(C) int delegate(void*);
                                                 auto x = (void*)
                                                 {
                                                     return 1;
                                                 };
gdk.Threads.threadsAddIdle(x, null);

1) You probably meant to apply `DD` to `x`.
2) `x` must be a `function`, not a `delegate`.
3) (optional) `static` is not needed.

So:

----
import gdk.Threads;
alias DD = extern(C) int function(void*);
DD x = (void*)
{
    return 1;
};
gdk.Threads.threadsAddIdle(x, null);
----

Reply via email to