diff options
author | Tomohiro <gpuppur@gmail.com> | 2020-02-09 04:09:49 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-08 20:09:49 +0100 |
commit | 2a4aa246206e0d611c7af853b3c4308e27966079 (patch) | |
tree | 0d8072a4404c2c92f9a2084186ff3eedc39f097a /lib/pure | |
parent | e4415422fe2b615a6dfe01bb7136ec41ef429108 (diff) | |
download | Nim-2a4aa246206e0d611c7af853b3c4308e27966079.tar.gz |
Add sideEffect pragma to importC procs in posix, winlean and time module (#13370)
* Add sideEffect pragma to procs in winlean * Add sideEffect pragma to procs in posix * Add test for #13306 * Add sideEffect pragma to procs in times * Fixes #13306
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/times.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim index 4a33197e2..3fc4d69df 100644 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -232,7 +232,7 @@ elif defined(posix): when defined(macosx): proc gettimeofday(tp: var Timeval, unused: pointer = nil) - {.importc: "gettimeofday", header: "<sys/time.h>".} + {.importc: "gettimeofday", header: "<sys/time.h>", sideEffect.} elif defined(windows): import winlean, std/time_t @@ -254,7 +254,7 @@ elif defined(windows): tm_yday*: cint ## Day of year [0,365]. tm_isdst*: cint ## Daylight Savings flag. - proc localtime(a1: var CTime): ptr Tm {.importc, header: "<time.h>".} + proc localtime(a1: var CTime): ptr Tm {.importc, header: "<time.h>", sideEffect.} type Month* = enum ## Represents a month. Note that the enum starts at ``1``, @@ -2527,7 +2527,7 @@ when not defined(js): Clock {.importc: "clock_t".} = distinct int proc getClock(): Clock - {.importc: "clock", header: "<time.h>", tags: [TimeEffect], used.} + {.importc: "clock", header: "<time.h>", tags: [TimeEffect], used, sideEffect.} var clocksPerSec {.importc: "CLOCKS_PER_SEC", nodecl, used.}: int |