D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2275 - std.utf.toUTF16z() should return const(wchar)*
Summary: std.utf.toUTF16z() should return const(wchar)*
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Windows
: P2 trivial
Assignee: Lars T. Kyllingstad
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-09 11:52 UTC by Koroskin Denis
Modified: 2015-06-09 01:21 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Koroskin Denis 2008-08-09 11:52:22 UTC
Currently it returns const(wchar*) which renders the pointer to be unnassignable anymore:

auto p = toUTF16z("test");
p = null; // variable p cannot modify const

The same goes to toMBSz, which returns const(char*) instead of const(char)*
Comment 2 Lars T. Kyllingstad 2010-08-11 02:42:01 UTC
Fixed DMD 2.048