Bug 6664 – BufferedFile this(HANDLE) uses undefined type.

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2011-09-13T12:27:00Z
Last change time
2016-10-14T23:01:01Z
Assigned to
nobody
Creator
jlquinn

Comments

Comment #0 by jlquinn — 2011-09-13T12:27:30Z
HANDLE is a Windows-specific type. It doesn't belong in the general Phobos API. However if it's going to be there, it needs to be a documented type and be obtainable in a platform-independent manner.
Comment #1 by dlang-bugzilla — 2011-09-13T12:38:11Z
You are misunderstanding the purpose of such constructors.
Comment #2 by dlang-bugzilla — 2011-09-13T12:42:12Z
Ignore my last comment. HANDLE is aliased to int on Posix. BufferedFile is inside std.stream, and the constructor which takes a HANDLE is not in a version(Windows).
Comment #3 by dlang-bugzilla — 2011-09-13T12:45:18Z
Sorry for the knee-jerk close, I thought you were talking about something in std.stdio which allows construction from a HANDLE on Windows platforms. For the record, std.stream is generally regarded as obsolete code which simply hasn't been rewritten yet. You may find that this is by far not the only poor design decision in the module.
Comment #4 by jlquinn — 2011-09-13T13:16:39Z
(In reply to comment #3) > Sorry for the knee-jerk close, I thought you were talking about something in > std.stdio which allows construction from a HANDLE on Windows platforms. > > For the record, std.stream is generally regarded as obsolete code which simply > hasn't been rewritten yet. You may find that this is by far not the only poor > design decision in the module. That's certainly fine. It might make sense to put a note at the top of the std.stream page that features are subject to change.
Comment #5 by andrei — 2016-10-14T23:01:01Z
no more std.stream -> this gets closed