summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorJake Leahy <jake@leahy.dev>2023-06-26 23:07:42 +1000
committerGitHub <noreply@github.com>2023-06-26 15:07:42 +0200
commit43a3de9077955031e55691ebb84ee958f6aa260e (patch)
treea83171f9fdea667c36d18c7c7a9bcb15bfae0f61 /lib/pure
parent3e44d5742fe7fb54d91465320ee19cb613ae0b46 (diff)
downloadNim-43a3de9077955031e55691ebb84ee958f6aa260e.tar.gz
Fix regression in `std/times` (#22155)
* Add simple test case

Just so the regression doesn't happen again

* Specify initDateTime is gcsafe in the forward declarations
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/times.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim
index bea1ac760..4f7af657c 100644
--- a/lib/pure/times.nim
+++ b/lib/pure/times.nim
@@ -1529,11 +1529,11 @@ proc getClockStr*(dt = now()): string {.rtl, extern: "nt$1", tags: [TimeEffect].
 proc initDateTime*(weekday: WeekDay, isoweek: IsoWeekRange, isoyear: IsoYear,
                    hour: HourRange, minute: MinuteRange, second: SecondRange,
                    nanosecond: NanosecondRange,
-                   zone: Timezone = local()): DateTime {.raises: [], tags: [], since: (1, 5).}
+                   zone: Timezone = local()): DateTime {.gcsafe, raises: [], tags: [], since: (1, 5).}
 
 proc initDateTime*(weekday: WeekDay, isoweek: IsoWeekRange, isoyear: IsoYear,
                    hour: HourRange, minute: MinuteRange, second: SecondRange,
-                   zone: Timezone = local()): DateTime {.raises: [], tags: [], since: (1, 5).}
+                   zone: Timezone = local()): DateTime {.gcsafe, raises: [], tags: [], since: (1, 5).}
 
 #
 # TimeFormat