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 function(const(short*), ulong, void*'
because my function is member of a class
On Thursday, 31 October 2019 at 16:03:22 UTC, bachmeier wrote:
On Thursday, 31 October 2019 at 15:11:42 UTC, Ferhat Kurtulmuş
wrote:
It would be nice if one reimplement writeln of Phobos by
bypassing gc and use a custom nogc exception as described
here*? Of course I can imagine that it would
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 Thursday, October 31, 2019 9:11:42 AM MDT Ferhat Kurtulmuş via
Digitalmars-d-learn wrote:
> On Thursday, 31 October 2019 at 13:46:07 UTC, Adam D. Ruppe wrote:
> > On Thursday, 31 October 2019 at 03:56:56 UTC, lili wrote:
> >> Hi:
> >>why writeln need GC?
> >
> > It almost never does, it
Is there a trick to execute only the test, defined in one file?
Or the Tests of a certain Module?
Or in general: How to avoid to execute all the tests, when
running "dub test"?
It doesn't has to be dub, though.
On Saturday, 2 November 2019 at 17:27:14 UTC, Martin Brezel wrote:
Is there a trick to execute only the test, defined in one file?
Or the Tests of a certain Module?
Or in general: How to avoid to execute all the tests, when
running "dub test"?
It doesn't has to be dub, though.
dmd -unittest
On Saturday, 2 November 2019 at 17:27:14 UTC, Martin Brezel wrote:
Is there a trick to execute only the test, defined in one file?
Or the Tests of a certain Module?
Or in general: How to avoid to execute all the tests, when
running "dub test"?
It doesn't has to be dub, though.
Not by
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 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
Hi all,
I just found that DFL gui library very interesting. But after
some searching, i can see that DFL is inactive and there is few
other forks for it. So this is my question - Which fork is good
for a gui development in windows platform.
BTW, i just tested the gtkD and successfully compiled
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 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 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 Thursday, 31 October 2019 at 03:56:56 UTC, lili wrote:
Hi:
why writeln need GC?
See also Mir's @nogc formatting module
https://github.com/libmir/mir-runtime/blob/master/source/mir/format.d
14 matches
Mail list logo