Skip to content

Commit

Permalink
Compatibility with newer nim
Browse files Browse the repository at this point in the history
  • Loading branch information
yglukhov committed Nov 4, 2018
1 parent db371a1 commit ec889fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion jnim.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.4.1"
version = "0.4.2"
author = "Anatoly Galiulin, Yuriy Glukhov"
description = "Java bridge for Nim"
license = "MIT"
Expand Down
10 changes: 1 addition & 9 deletions src/private/jni_generator.nim
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,6 @@ proc mkGenericParams(p: seq[GenericType]): NimNode {.compileTime.} =
# Add type and default value for the idenifiers list
result[0].add(newEmptyNode()).add(newEmptyNode())

proc mkFuncName(cd: ClassDef, fName: string): NimNode {.compileTime.} =
if cd.genericTypes.len == 0:
result = identEx(cd.isExported, fName)
else:
result = newNimNode(nnkBracketExpr).add(identEx(cd.isExported, fName))
for name in cd.genericTypes:
result.add(ident(name))

proc mkTypeHelper(name: string, params: seq[GenericType]): NimNode {.compileTime.} =
if params.len == 0:
result = ident(name)
Expand Down Expand Up @@ -506,7 +498,7 @@ proc generateProperty(cd: ClassDef, pd: ProcDef, def: NimNode, isSetter: bool):
result = def.copyNimTree
fillGenericParameters(cd, pd, result)
result.pragma = newEmptyNode()
result.name = identEx(pd.isExported, pd.name, isSetter)
result[ProcNamePos] = identEx(pd.isExported, pd.name, isSetter)
var objToCall: NimNode
# Add first parameter
if pd.isStatic:
Expand Down

0 comments on commit ec889fd

Please sign in to comment.