On Friday, 23 November 2012 at 13:10:56 UTC, Gor Gyolchanyan wrote:
I'll look into the opportunity to refactor the dsource.org WinAPI binding, because it's much closer to reality then Derelict. In that case It'll take a few hours to finish (quite fast). Would you suggest me to send a pull request to druntime with the new modules? How long will it take to be
merged?

Does this include adapting druntime to use the new bindings?

There might be some incompatibilities, for example due to how the HANDLE type is declared. In C, you can use either 0 or NULL as a parameter to a function accepting an integer or pointer. In D, you cannot. IIRC, some types were declared differently in Druntime's modules and in the win32 bindings.

If breaking code were not an issue, the best solution would be to make HANDLE a unique, opaque type (like a struct wrapping an intptr_t or void*) - which is exactly how it should be treated. It would need to support assignment/creation from "null" though.

Reply via email to