address comments

This commit is contained in:
Timothee Cour 2018-12-04 02:51:27 -08:00
commit e4850b7f1c
3 changed files with 3 additions and 3 deletions

View file

@ -91,7 +91,7 @@ proc enumToString*(enums: openArray[enum]): string =
- Vm suport for float32<->int32 and float64<->int64 casts was added. - Vm suport for float32<->int32 and float64<->int64 casts was added.
- There is a new pragma block `noSideEffect` that works like - There is a new pragma block `noSideEffect` that works like
the `gcsafe` pragma block. the `gcsafe` pragma block.
- added os.processID() - added os.getCurrentProcessId()
### Language changes ### Language changes

View file

@ -2419,7 +2419,7 @@ proc isHidden*(path: string): bool {.noNimScript.} =
let fileName = lastPathPart(path) let fileName = lastPathPart(path)
result = len(fileName) >= 2 and fileName[0] == '.' and fileName != ".." result = len(fileName) >= 2 and fileName[0] == '.' and fileName != ".."
proc processID*(): int {.noNimScript.} = proc getCurrentProcessId*(): int {.noNimScript.} =
## return current process ID. See also ``osproc.processID(p: Process)``. ## return current process ID. See also ``osproc.processID(p: Process)``.
when defined(windows): when defined(windows):
proc GetCurrentProcessId(): DWORD {.stdcall, dynlib: "kernel32", proc GetCurrentProcessId(): DWORD {.stdcall, dynlib: "kernel32",

View file

@ -155,7 +155,7 @@ proc running*(p: Process): bool {.rtl, extern: "nosp$1", tags: [].}
## Returns true iff the process `p` is still running. Returns immediately. ## Returns true iff the process `p` is still running. Returns immediately.
proc processID*(p: Process): int {.rtl, extern: "nosp$1".} = proc processID*(p: Process): int {.rtl, extern: "nosp$1".} =
## returns `p`'s process ID. See also ``os.processID()``. ## returns `p`'s process ID. See also ``os.getCurrentProcessId()``.
return p.id return p.id
proc waitForExit*(p: Process, timeout: int = -1): int {.rtl, proc waitForExit*(p: Process, timeout: int = -1): int {.rtl,