handling of compiler procs improved for DLL generation
This commit is contained in:
parent
804e2ac89d
commit
ff02ce2d50
33 changed files with 694 additions and 664 deletions
|
|
@ -24,7 +24,12 @@ proc nimUnloadLibrary(lib: TLibHandle) {.compilerproc.}
|
|||
proc nimGetProcAddr(lib: TLibHandle, name: cstring): TProcAddr {.compilerproc.}
|
||||
|
||||
proc nimLoadLibraryError(path: string) {.compilerproc, noinline.} =
|
||||
raise newException(EInvalidLibrary, "could not load: " & path)
|
||||
when true:
|
||||
# carefully written to avoid memory allocation:
|
||||
stdout.write("could not load: ")
|
||||
quit(path)
|
||||
else:
|
||||
raise newException(EInvalidLibrary, "could not load: " & path)
|
||||
|
||||
# this code was inspired from Lua's source code:
|
||||
# Lua - An Extensible Extension Language
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue