about summary refs log tree commit diff stats
path: root/src/types
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-11-07 16:34:49 +0100
committerbptato <nincsnevem662@gmail.com>2024-11-07 16:34:49 +0100
commit44faa6c9115a89e64c9e6117e6f3f80b1ca3f093 (patch)
treea69164ed0fe697b8f36a830e4a8a809e700f9684 /src/types
parente03c9a450b20c65b094348056f65b891fb95b3f4 (diff)
downloadchawan-44faa6c9115a89e64c9e6117e6f3f80b1ca3f093.tar.gz
url: fix compilation on Nim 1.6.14
it handles side effects differently
Diffstat (limited to 'src/types')
-rw-r--r--src/types/url.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/types/url.nim b/src/types/url.nim
index 9d3f7c2c..4e666d53 100644
--- a/src/types/url.nim
+++ b/src/types/url.nim
@@ -370,7 +370,7 @@ proc processIdna(str: string; beStrict: bool): string =
       labels &= label
   return labels
 
-func unicodeToAscii(s: string; beStrict: bool): string =
+proc unicodeToAscii(s: string; beStrict: bool): string =
   let processed = s.processIdna(beStrict)
   var labels = ""
   var all = 0
@@ -396,7 +396,7 @@ func unicodeToAscii(s: string; beStrict: bool): string =
       return "" #error
   return labels
 
-func domainToAscii(domain: string; bestrict = false): string =
+proc domainToAscii(domain: string; bestrict = false): string =
   var needsprocessing = false
   for s in domain.split('.'):
     if s.startsWith("xn--") or AllChars - Ascii in s:
@@ -407,7 +407,7 @@ func domainToAscii(domain: string; bestrict = false): string =
     return domain.unicodeToAscii(bestrict)
   return domain.toLowerAscii()
 
-func parseHost(input: string; special: bool): Host =
+proc parseHost(input: string; special: bool): Host =
   if input.len == 0:
     return Host(t: htNone)
   if input[0] == '[':