void* pointers get corrupted: D bug or misunderstanding?
Federico Santamorena
federico at santamorena.me
Mon Jul 29 12:44:57 UTC 2019
On Monday, 29 July 2019 at 12:18:51 UTC, Kagamin wrote:
> 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);
> }
Thanks to all in this thread, recently all the problems I am
having with D are because D is actually superior to C and some
assumptions I still have because of C should be uninstalled from
my brain
Thanks.
More information about the Digitalmars-d
mailing list