Windows: fixes a regression; codegen might not know about & at this point
This commit is contained in:
parent
db2b215658
commit
13a83c7fdd
3 changed files with 3 additions and 2 deletions
0
bootstrap.sh
Executable file → Normal file
0
bootstrap.sh
Executable file → Normal file
0
lib/pure/unittest.nim
Executable file → Normal file
0
lib/pure/unittest.nim
Executable file → Normal file
|
|
@ -109,9 +109,10 @@ elif defined(windows) or defined(dos):
|
|||
proc nimGetProcAddr(lib: LibHandle, name: cstring): ProcAddr =
|
||||
result = getProcAddress(cast[THINSTANCE](lib), name)
|
||||
if result != nil: return
|
||||
var decorated: array[250, char]
|
||||
for i in countup(0, 50):
|
||||
var decorated = "_" & $name & "@" & $(i * 4)
|
||||
result = getProcAddress(cast[THINSTANCE](lib), cstring(decorated))
|
||||
discard csprintf(decorated, "_%s@%ld", name, i*4)
|
||||
result = getProcAddress(cast[THINSTANCE](lib), decorated)
|
||||
if result != nil: return
|
||||
procAddrError(name)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue