On Saturday, 2 November 2019 at 20:42:29 UTC, Luh wrote:
Yup that's it !
Many thanks !
One word of warning: ensure the C library does not have the only
reference to your Game class instance, or the garbage collector
might deallocate it since it does not scan threads created by C
libraries.
On Saturday, 2 November 2019 at 19:55:58 UTC, Dennis wrote:
On Saturday, 2 November 2019 at 19:42:54 UTC, Luh wrote:
So I think I just can't. :(
Is that `void* c` in the callback a context pointer by any
chance?
That's a common thing in C callbacks precisely for purposes
like this.
You can
On Saturday, 2 November 2019 at 19:42:54 UTC, Luh wrote:
So I think I just can't. :(
Is that `void* c` in the callback a context pointer by any chance?
That's a common thing in C callbacks precisely for purposes like
this.
You can cast your class to a void* when you register the callback
and
On Saturday, 2 November 2019 at 18:31:28 UTC, Stefan Koch wrote:
On Saturday, 2 November 2019 at 17:49:09 UTC, Luh wrote:
Hello,
When trying to pass a D function to the C callback, the
compiler says:
'Error: cannot implicitly convert expression
of type extern (C) bool
On Saturday, 2 November 2019 at 17:49:09 UTC, Luh wrote:
Hello,
When trying to pass a D function to the C callback, the
compiler says:
'Error: cannot implicitly convert expression
of type extern (C) bool delegate(const(short*) a, ulong b,
void* c) to extern (C) bool
On Saturday, 2 November 2019 at 17:49:09 UTC, Luh wrote:
Hello,
When trying to pass a D function to the C callback, the
compiler says:
'Error: cannot implicitly convert expression
of type extern (C) bool delegate(const(short*) a, ulong b,
void* c) to extern (C) bool