notnil fix for Nim 0.19

This commit is contained in:
Stefan Salewski 2018-09-30 20:45:01 +02:00
commit f7e692dbe2
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
# Package # Package
version = "0.4.5" version = "0.4.6"
author = "Stefan Salewski" author = "Stefan Salewski"
description = "High level GObject-Introspection based GTK3 bindings" description = "High level GObject-Introspection based GTK3 bindings"
license = "MIT" license = "MIT"
@ -8,7 +8,7 @@ skipDirs = @["examples", "tests"]
# Dependencies # Dependencies
requires "nim >= 0.18.0" requires "nim >= 0.19.0"
when defined(nimdistros): when defined(nimdistros):
import distros import distros

View file

@ -67,7 +67,7 @@ macro mconnect(widget: gobject.Object; signal: string; p: typed; arg: typed; ign
proc $1$2 {.cdecl.} = proc $1$2 {.cdecl.} =
let h: pointer = g_object_get_qdata(self, Quark) let h: pointer = g_object_get_qdata(self, Quark)
""" """
if sci.isNil or sci == "": # the simple signals if sci == "": # the simple signals
all = "(self: ptr gobject.Object00; xdata: pointer)" all = "(self: ptr gobject.Object00; xdata: pointer)"
ahl = "(self: gobject.Object)" ahl = "(self: gobject.Object)"
r1s.add(" $3(cast[$4](h)") r1s.add(" $3(cast[$4](h)")