Hello! If I have a D struct like:

struct Foo
{
    int bar;

    void addToBar(int what) {
        bar += what;
    }
}

How would I call `addToBar` from C code? Would I need to put the `addToBar` function outside of the struct and mark it as `extern (C)` and in normal D code take advantage of UFCS or is there some magic C incantation?

I've scoured the forums and other places for anything about this but couldn't find any information whatsoever... so yeah. (or my Google-fu is terrible)

Thanks!

Reply via email to