summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/pure/cgi.nim2
-rw-r--r--lib/pure/uri.nim2
-rw-r--r--lib/std/private/decode_helpers.nim (renamed from lib/pure/includes/decode_helpers.nim)8
3 files changed, 5 insertions, 7 deletions
diff --git a/lib/pure/cgi.nim b/lib/pure/cgi.nim
index 1f0e0736a..cb64a3b1b 100644
--- a/lib/pure/cgi.nim
+++ b/lib/pure/cgi.nim
@@ -32,7 +32,7 @@
 import strutils, os, strtabs, cookies, uri
 export uri.encodeUrl, uri.decodeUrl
 
-include includes/decode_helpers
+import std/private/decode_helpers
 
 proc addXmlChar(dest: var string, c: char) {.inline.} =
   case c
diff --git a/lib/pure/uri.nim b/lib/pure/uri.nim
index 15d0996a7..5b16bfcb1 100644
--- a/lib/pure/uri.nim
+++ b/lib/pure/uri.nim
@@ -47,7 +47,7 @@
 import std/private/since
 
 import strutils, parseutils, base64
-include includes/decode_helpers
+import std/private/decode_helpers
 
 
 type
diff --git a/lib/pure/includes/decode_helpers.nim b/lib/std/private/decode_helpers.nim
index 74fe37d07..586c7cae6 100644
--- a/lib/pure/includes/decode_helpers.nim
+++ b/lib/std/private/decode_helpers.nim
@@ -1,14 +1,12 @@
-# Include file that implements 'decodePercent' and friends. Do not import it!
-
-proc handleHexChar(c: char, x: var int, f: var bool) {.inline.} =
+proc handleHexChar*(c: char, x: var int, f: var bool) {.inline.} =
   case c
   of '0'..'9': x = (x shl 4) or (ord(c) - ord('0'))
   of 'a'..'f': x = (x shl 4) or (ord(c) - ord('a') + 10)
   of 'A'..'F': x = (x shl 4) or (ord(c) - ord('A') + 10)
   else: f = true
 
-proc decodePercent(s: string, i: var int): char =
-  ## Converts `%xx` hexadecimal to the charracter with ordinal number `xx`.
+proc decodePercent*(s: openArray[char], i: var int): char =
+  ## Converts `%xx` hexadecimal to the character with ordinal number `xx`.
   ##
   ## If `xx` is not a valid hexadecimal value, it is left intact: only the
   ## leading `%` is returned as-is, and `xx` characters will be processed in the