Skip to content

Commit

Permalink
deprecate funcs seq[Rune]
Browse files Browse the repository at this point in the history
  • Loading branch information
nitely committed May 30, 2020
1 parent acfb98c commit 6538327
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ env:
- NIM=0.19.0
- NIM=0.19.6
- NIM=1.0.6
- NIM=1.2.0
before_install:
- docker pull nimlang/nim:$NIM
script:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v0.8.0
==================

* Deprecate functions taking a `seq[Rune]`

v0.7.0
==================

Expand Down
4 changes: 2 additions & 2 deletions normalize.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.7.1"
version = "0.8.0"
author = "Esteban Castro Borsani (@nitely)"
description = "Unicode normalization forms (tr15)"
license = "MIT"
Expand All @@ -18,4 +18,4 @@ task test, "Test":
exec "nim c -r tests/tests"

task docs, "Docs":
exec "nim doc2 -o:./docs/index.html ./src/normalize.nim"
exec "nim doc --project -o:./docs ./src/normalize.nim"
24 changes: 12 additions & 12 deletions src/normalize.nim
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ iterator toNFD*(s: string): Rune {.inline.} =
for r in toNF(s, nftNfd):
yield r

iterator toNFD*(s: seq[Rune]): Rune {.inline.} =
iterator toNFD*(s: seq[Rune]): Rune {.inline, deprecated: "Use toNFD(string)".} =
## Iterates over each normalized unicode character
for r in toNF(s, nftNfd):
yield r
Expand All @@ -418,7 +418,7 @@ iterator toNFC*(s: string): Rune {.inline.} =
for r in toNF(s, nftNfc):
yield r

iterator toNFC*(s: seq[Rune]): Rune {.inline.} =
iterator toNFC*(s: seq[Rune]): Rune {.inline, deprecated: "Use toNFC(string)".} =
## Iterates over each normalized unicode character
for r in toNF(s, nftNfc):
yield r
Expand All @@ -428,7 +428,7 @@ iterator toNFKD*(s: string): Rune {.inline.} =
for r in toNF(s, nftNfkd):
yield r

iterator toNFKD*(s: seq[Rune]): Rune {.inline.} =
iterator toNFKD*(s: seq[Rune]): Rune {.inline, deprecated: "Use toNFKD(string)".} =
## Iterates over each normalized unicode character
for r in toNF(s, nftNfkd):
yield r
Expand All @@ -438,7 +438,7 @@ iterator toNFKC*(s: string): Rune {.inline.} =
for r in toNF(s, nftNfkc):
yield r

iterator toNFKC*(s: seq[Rune]): Rune {.inline.} =
iterator toNFKC*(s: seq[Rune]): Rune {.inline, deprecated: "Use toNFKC(string)".} =
## Iterates over each normalized unicode character
for r in toNF(s, nftNfkc):
yield r
Expand Down Expand Up @@ -475,7 +475,7 @@ proc toNFD*(s: string): string =
## the size of the input
toNF(s, nftNfd)

proc toNFD*(s: seq[Rune]): seq[Rune] =
proc toNFD*(s: seq[Rune]): seq[Rune] {.deprecated: "Use toNFD(string)".} =
## Return the normalized input.
## Result may take 4 times
## the size of the input
Expand All @@ -487,7 +487,7 @@ proc toNFC*(s: string): string =
## the size of the input
toNF(s, nftNfc)

proc toNFC*(s: seq[Rune]): seq[Rune] =
proc toNFC*(s: seq[Rune]): seq[Rune] {.deprecated: "Use toNFC(string)".} =
## Return the normalized input.
## Result may take 3 times
## the size of the input
Expand All @@ -499,7 +499,7 @@ proc toNFKD*(s: string): string =
## the size of the input
toNF(s, nftNfkd)

proc toNFKD*(s: seq[Rune]): seq[Rune] =
proc toNFKD*(s: seq[Rune]): seq[Rune] {.deprecated: "Use toNFKD(string)".} =
## Return the normalized input.
## Result may take 18 times
## the size of the input
Expand All @@ -511,7 +511,7 @@ proc toNFKC*(s: string): string =
## the size of the input
toNF(s, nftNfkc)

proc toNFKC*(s: seq[Rune]): seq[Rune] =
proc toNFKC*(s: seq[Rune]): seq[Rune] {.deprecated: "Use toNFKC(string)".} =
## Return the normalized input.
## Result may take 18 times
## the size of the input
Expand Down Expand Up @@ -585,7 +585,7 @@ proc isNFC*(s: string): bool {.inline.} =
## the result is always ``false`` (even if it's normalized)
isNF(s, nftNfc) == qcsYes

proc isNFC*(s: seq[Rune]): bool {.inline.} =
proc isNFC*(s: seq[Rune]): bool {.inline, deprecated: "Use isNFC(string)".} =
## Return whether the unicode characters
## are normalized or not. For some inputs
## the result is always ``false`` (even if it's normalized)
Expand All @@ -597,7 +597,7 @@ proc isNFD*(s: string): bool {.inline.} =
## the result is always ``false`` (even if it's normalized)
isNF(s, nftNfd) == qcsYes

proc isNFD*(s: seq[Rune]): bool {.inline.} =
proc isNFD*(s: seq[Rune]): bool {.inline, deprecated: "Use isNFD(string)".} =
## Return whether the unicode characters
## are normalized or not. For some inputs
## the result is always ``false`` (even if it's normalized)
Expand All @@ -609,7 +609,7 @@ proc isNFKC*(s: string): bool {.inline.} =
## the result is always ``false`` (even if it's normalized)
isNF(s, nftNfkc) == qcsYes

proc isNFKC*(s: seq[Rune]): bool {.inline.} =
proc isNFKC*(s: seq[Rune]): bool {.inline, deprecated: "Use isNFKC(string)".} =
## Return whether the unicode characters
## are normalized or not. For some inputs
## the result is always ``false`` (even if it's normalized)
Expand All @@ -621,7 +621,7 @@ proc isNFKD*(s: string): bool {.inline.} =
## the result is always ``false`` (even if it's normalized)
isNF(s, nftNfkd) == qcsYes

proc isNFKD*(s: seq[Rune]): bool {.inline.} =
proc isNFKD*(s: seq[Rune]): bool {.inline, deprecated: "Use isNFKD(string)".} =
## Return whether the unicode characters
## are normalized or not. For some inputs
## the result is always ``false`` (even if it's normalized)
Expand Down

0 comments on commit 6538327

Please sign in to comment.