Update to Nim-2.0.0

This commit is contained in:
Emery Hemingway 2023-08-16 14:42:13 +01:00
parent f83e57ee22
commit 60515ad408
2 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
# Package # Package
version = "20230506" version = "20230816"
author = "Emery Hemingway" author = "Emery Hemingway"
description = "Syndicate actor for asserting Fontconfig information" description = "Syndicate actor for asserting Fontconfig information"
license = "Unlicense" license = "Unlicense"
@ -10,4 +10,4 @@ bin = @["fontconfig_actor"]
# Dependencies # Dependencies
requires "nim >= 1.6.10", "syndicate >= 20230518" requires "nim >= 2.0.0", "syndicate >= 20230816"

View File

@ -146,7 +146,7 @@ template withFontconfig(body: untyped): untyped =
body body
Fini() Fini()
proc serve(ds: Ref; turn: var Turn) = proc serve(ds: Cap; turn: var Turn) =
let observation = ?Observe(pattern: !FontAssertion) ?? {0: grabDict()} let observation = ?Observe(pattern: !FontAssertion) ?? {0: grabDict()}
during(turn, ds, observation) do (properties: Preserve[void]): during(turn, ds, observation) do (properties: Preserve[void]):
var fontAssert: FontAssertion var fontAssert: FontAssertion
@ -157,7 +157,7 @@ proc serve(ds: Ref; turn: var Turn) =
var var
res = FcResultNoMatch res = FcResultNoMatch
pat = fillPattern(fontAssert.pattern) pat = fillPattern(fontAssert.pattern)
font = FontMatch(nil, pat, res) font = FontMatch(FcConfig(nil), pat, res)
if res != FcResultMatch: if res != FcResultMatch:
logError "no font matched for ", fontAssert.pattern logError "no font matched for ", fontAssert.pattern
else: else:
@ -166,7 +166,7 @@ proc serve(ds: Ref; turn: var Turn) =
PatternDestroy(pat) PatternDestroy(pat)
discard publish(turn, ds, fontAssert) discard publish(turn, ds, fontAssert)
runActor("main") do (root: Ref; turn: var Turn): runActor("main") do (root: Cap; turn: var Turn):
connectStdio(root, turn) connectStdio(root, turn)
during(turn, root, ?BootArguments) do (ds: Ref): during(turn, root, ?BootArguments) do (ds: Cap):
serve(ds, turn) serve(ds, turn)