void* pointers get corrupted: D bug or misunderstanding?
Kagamin
spam at here.lot
Mon Jul 29 12:18:51 UTC 2019
struct DrillGtkContext
{
static extern(C)
void gtk_search_changed(GtkEditable* widget, ref
DrillGtkContext context)
{
context.onSearchChanged();
}
void onSearchChanged()
{
...
startCrawling(drillConfig, searchString, &resultFound);
}
void resultFound(immutable(FileInfo) result)
{
...
queue.g_async_queue_push(f);
}
}
...
DrillContext* startCrawling(
in const(DrillConfig) config,
in immutable(string) searchValue,
scope void delegate(immutable(FileInfo)) resultCallback)
{
...
new Crawler(..., c.callback);
}
More information about the Digitalmars-d
mailing list