Re: Delegates and C function pointers

2014-11-08 Thread Gary Willoughby via Digitalmars-d-learn
On Saturday, 8 November 2014 at 12:23:45 UTC, Nicolas Sicard wrote: I would like to register a D delegate to a C API that takes a function pointer as a callback and a void* pointer to pass data to this callback. My solution is in http://dpaste.dzfl.pl/7d9b504b4b965. Is this code correct? Is

Re: Delegates and C function pointers

2014-11-08 Thread anonymous via Digitalmars-d-learn
On Saturday, 8 November 2014 at 12:23:45 UTC, Nicolas Sicard wrote: I would like to register a D delegate to a C API that takes a function pointer as a callback and a void* pointer to pass data to this callback. My solution is in http://dpaste.dzfl.pl/7d9b504b4b965. Is this code correct? Is

Re: Delegates and C function pointers

2014-11-08 Thread Nicolas Sicard via Digitalmars-d-learn
On Saturday, 8 November 2014 at 16:01:09 UTC, anonymous wrote: On Saturday, 8 November 2014 at 12:23:45 UTC, Nicolas Sicard wrote: I would like to register a D delegate to a C API that takes a function pointer as a callback and a void* pointer to pass data to this callback. My solution is in