add error for missing commandLineParams (#13719)

* add error for missing commandLineParams

* fixup

* rewrite
This commit is contained in:
Andy Davidoff 2020-03-23 06:08:37 -04:00 • committed by GitHub
commit fa06203e90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2770,6 +2770,10 @@ when declared(paramCount) or defined(nimdoc):
result = @[]
for i in 1..paramCount():
result.add(paramStr(i))
else:
proc commandLineParams*(): seq[TaintedString] {.error:
"commandLineParams() unsupported by dynamic libraries".} =
discard
when not weirdTarget and (defined(freebsd) or defined(dragonfly)):
proc sysctl(name: ptr cint, namelen: cuint, oldp: pointer, oldplen: ptr csize_t,