C callback receives bad pointer argument

bearophile bearophileHUGS at lycos.com
Thu Jun 30 15:47:40 PDT 2011


> Now that typedef is deprecated what solution do you suggest instead?

Something like this, I think:

struct ccharPtr {
    const char* ptr;
    alias ptr this;
}

ccharPtr toStringz2(string s) {
    return ccharPtr(toStringz(s));
}

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list