Bug 21523 – Microsoft Windows std.stdio.File.lock(), tryLock(), unlock(): do not allocate memory for error messages when they are not needed

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2021-01-04T01:08:48Z
Last change time
2021-01-04T03:55:30Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2021-01-04T01:08:48Z
The non-Windows paths use `errnoEnforce` that lazily evaluates the messages. The Windows path uses a private function `wenforce` that evaluates its arguments eagerly.
Comment #1 by dlang-bot — 2021-01-04T01:15:50Z
@n8sh created dlang/phobos pull request #7740 "Microsoft Windows std.stdio.File.lock(), tryLock(), unlock(): do not allocate memory for error messages when they are not needed" fixing this issue: - Fix Issue 21523 - Microsoft Windows std.stdio.File.lock(), tryLock(), unlock(): do not allocate memory for error messages when they are not needed https://github.com/dlang/phobos/pull/7740
Comment #2 by dlang-bot — 2021-01-04T03:55:30Z
dlang/phobos pull request #7740 "Microsoft Windows std.stdio.File.lock(), tryLock(), unlock(): do not allocate memory for error messages when they are not needed" was merged into master: - 5aeaa1f873f5c0d04d27816466960d298503491b by Nathan Sashihara: Fix Issue 21523 - Microsoft Windows std.stdio.File.lock(), tryLock(), unlock(): do not allocate memory for error messages when they are not needed https://github.com/dlang/phobos/pull/7740