Using out qualifier instead of *, how to pass null?
rmann-d-lang at latencyzero.com
Thu Feb 1 00:00:01 PST 2007
In wrapping this C API, I've been going back and forth between converting "Foo*" output parameters to "out Foo". I prefer the latter, as I don't have to take the address at the call site, but I don't seem to be able to pass null (which the API allows, meaning, "I'm not interested in this return value").
Am I just stuck with Foo*? Alternatively, I can overload the C function with D wrappers, I suppose. Hmm. That's probably best.
More information about the Digitalmars-d-learn