std: Move some terminal-related wrappers to winlean#25766
std: Move some terminal-related wrappers to winlean#25766ZoomRmc wants to merge 1 commit intonim-lang:develfrom
winlean#25766Conversation
`duplicateHandle` and `DUPLICATE_SAME_ACCESS` were already in winlean, other stuff moved.
|
I also wanted the symlink-handling to go into the other direction, symlink-specific Windows declarations should move to its module. (Also once the CI is green, the symlink PR will be merged, sorry for my resistance, I did more research and I learned that other stdlibs also do in fact deal with this nonsense...) |
|
It's not an easy question. In this case, again, the procs are already in stdlib, just not exported, but they are consistently used by other libs that already import winlean anyway, so offering them publicly is logical and doesn't bring anything new (and thus possibly problematic) into the library. Also, moving stuff to their modules privately leads to code duplication, such as two instances discovered with this PR. Localizing wrappers guarantees a stable and interdependent API, and simplifies possible later changes, like changing Appreciate your symlink comment! |
duplicateHandleandDUPLICATE_SAME_ACCESSwere already in winlean, other stuff moved.Since std already uses them in
terminalprivately, makes sense to move them and export.Almost every library/app concerned with terminal handling rewraps these: