Skip to content

Commit 798f514

Browse files
authored
fix using the correct calling convention on win32 (#248)
1 parent 27f29a2 commit 798f514

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/optimize.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,17 @@ function build_compiled_call!(stmt, methname, fcall, typargs, code, idx, nargs,
304304
function $methname($(wrapargs...)) where {$(sparams...)}
305305
return $fcall($cfunc, llvmcall, $RetType, $ArgType, $(argnames...))
306306
end)
307+
elseif stmt.args[4] == :(:stdcall)
308+
def = :(
309+
function $methname($(wrapargs...)) where {$(sparams...)}
310+
return $fcall($cfunc, stdcall, $RetType, $ArgType, $(argnames...))
311+
end)
307312
else
308313
def = :(
309314
function $methname($(wrapargs...)) where {$(sparams...)}
310315
return $fcall($cfunc, $RetType, $ArgType, $(argnames...))
311316
end)
312-
end
317+
end
313318
f = Core.eval(CompiledCalls, def)
314319
stmt.args[1] = QuoteNode(f)
315320
stmt.head = :call

0 commit comments

Comments
 (0)