Skip to content

Commit

Permalink
updates to support Nim version >= 0.20, due to report by @narimiran 6…
Browse files Browse the repository at this point in the history
  • Loading branch information
ba0f3 committed Nov 25, 2020
1 parent 1029e4b commit 30afca8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions sam.nim
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ type

NamingConverter = proc(input: string): string

when (NimMajor, NimMinor, NimPatch) < (1, 4, 0):
type
IndexDefect* = IndexError
FieldDefect* = FieldError

{.push boundChecks: off, overflowChecks: off.}

template getValue(t: JsmnToken, json: string): untyped =
Expand Down
5 changes: 2 additions & 3 deletions sam.nimble
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Package

version = "0.1.15"
version = "0.1.16"
author = "Huy Doan"
description = "Fast and just works JSON-Binding for Nim"
license = "MIT"

skipDirs = @["tests"]

# Dependencies
requires "nim >= 0.20"
requires "jsmn >= 0.2"
requires "nim >= 0.20, jsmn >= 0.2"
2 changes: 1 addition & 1 deletion tests/test3.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ../sam, strutils
import ../sam

var sub = {
"method": "POST",
Expand Down

0 comments on commit 30afca8

Please sign in to comment.