Problem with interfacing C code to D

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Jan 9 17:40:26 PST 2012


Scratch that, in X11 apparently the Display structure is an incomplete
type (so sizeof won't work). This means you most probably *have* to
use pass it around as an opaque pointer. It's kind of odd because you
can still access some of its fields (so it's not totally opaque), but
you can't do copies.

So just use pointers and you'll be safe.

Hell I've never really done any C programming except what's in K&R,
but this seems like a logical conclusion to me..


More information about the Digitalmars-d-learn mailing list