void* pointers get corrupted: D bug or misunderstanding?
Dennis
dkorpel at gmail.com
Sun Jul 28 18:37:26 UTC 2019
On Sunday, 28 July 2019 at 18:32:24 UTC, Federico Santamorena
wrote:
> So the problem I am noticing is very simple: as you may know
> GTK callbacks have a void* user_data argument, what happens, is
> that if the flow of code is this: D => C => D the void* pointer
> when reaching the third step and finally emerging to the D
> language will change its value and get corrupted.
Can you give your exact callback function definition? I once had
my context pointer corrupted because I marked my callback
extern(C) instead of extern(Windows). Maybe you also have an
error in your definition somewhere.
More information about the Digitalmars-d
mailing list