atilaneves / dpp

Directly include C headers in D source code
Boost Software License 1.0
231 stars 31 forks source link

LPCWSTR and other strings are translated to ints #296

Open Temtaime opened 3 years ago

Temtaime commented 3 years ago
#include "windows.h"

struct S
{
    LPCWSTR p;
};

Produces

extern (C)
{
    struct S
    {
        const(ushort)* p;
    }
}

Can we have a wchar ?

atilaneves commented 3 years ago

I have to check what libclang thinks this is, which means checking on Windows, which... ugh. It might just be that it treats it the same as uint16_t, in which case there's no way to know it's supposed to be a character type in D unless it's special cased somehow.