Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make a full replacement for winlean #701

Open
ringabout opened this issue Apr 23, 2021 · 1 comment
Open

make a full replacement for winlean #701

ringabout opened this issue Apr 23, 2021 · 1 comment

Comments

@ringabout
Copy link
Collaborator

ringabout commented Apr 23, 2021

Ref nim-lang#12327

The problem

std/winlean keep causing problems, but for backward compatibility, we cannot correct the wrong definitions because they are exported.

The solution

Make a replacement module for std/winlean, and replace the std/winlean gradually. We need to correct some procs mainly which are not exported in the standard libraries.

For example we need to change these procs first. Note that createWinApi is not exported, so we can correct the definitions safely.

import std/windefs

proc createWinApi(x: DWORD) {.importc.}

proc userProc*(x: int) =
  var x: DWORD
  createWinAPI(x)

Then we should consider whether we can make further progresses.

@ringabout ringabout self-assigned this Apr 23, 2021
@timotheecour
Copy link
Owner

very relevant: nim-lang/RFCs#344

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants