some small fixes due to compiler warnings

This commit is contained in:
Stefan Salewski 2019-01-15 21:18:06 +01:00
commit 27efbc78e2
3 changed files with 8 additions and 5 deletions

View file

@ -138,7 +138,7 @@ type
x*: cdouble x*: cdouble
y*: cdouble y*: cdouble
PathData00* = object {.union.} PathData00* {.union.} = object
header*: INNER_C_STRUCT_3330700347 header*: INNER_C_STRUCT_3330700347
point*: INNER_C_STRUCT_1651263489 point*: INNER_C_STRUCT_1651263489

View file

@ -85,9 +85,11 @@ proc $1$2 {.cdecl.} =
ipos = i ipos = i
break break
assert(ipos >= 0) assert(ipos >= 0)
let ipronode = p.symbol.getImpl().params[ipos + 1][1] # the actual data type for interface providers #let ipronode = p.symbol.getImpl().params[ipos + 1][1] # the actual data type for interface providers
let ipronode = p.getImpl().params[ipos + 1][1]
if ipronode.isNil: if ipronode.isNil:
quit("Error: Signal-Handler has too few parameters: " & $(p.symbol.getImpl().name.toStrLit) & $(p.symbol.getImpl().params.toStrLit)) #quit("Error: Signal-Handler has too few parameters: " & $(p.symbol.getImpl().name.toStrLit) & $(p.symbol.getImpl().params.toStrLit))
quit("Error: Signal-Handler has too few parameters: " & $(p.getImpl().name.toStrLit) & $(p.getImpl().params.toStrLit))
else: else:
ipro = $(ipronode.toStrLit) ipro = $(ipronode.toStrLit)
var ipros = hargs[ipos].split(" | ") var ipros = hargs[ipos].split(" | ")

View file

@ -1,5 +1,5 @@
# High level gobject-introspection based GTK3 bindings for the Nim programming language # High level gobject-introspection based GTK3 bindings for the Nim programming language
# v 0.4.7 2018-OCT-22 # v 0.4.8 2019-JAN-15
# (c) S. Salewski 2018 # (c) S. Salewski 2018
# https://wiki.gnome.org/Projects/GObjectIntrospection # https://wiki.gnome.org/Projects/GObjectIntrospection
@ -880,7 +880,8 @@ proc writeMethod(info: GIBaseInfo; minfo: GIFunctionInfo; genProxy = false) =
proc writeUnion(info: GIUnionInfo) = proc writeUnion(info: GIUnionInfo) =
if not suppressType: if not suppressType:
output.writeLine("type") output.writeLine("type")
output.writeLine(" ", mangleName(gBaseInfoGetName(info)) & "00" & EM, " = object {.union.}") #output.writeLine(" ", mangleName(gBaseInfoGetName(info)) & "00" & EM, " = object {.union.}")
output.writeLine(" ", mangleName(gBaseInfoGetName(info)) & "00" & EM, " {.union.} = object")
let n = info.gUnionInfoGetNFields() let n = info.gUnionInfoGetNFields()
for j in 0.cint ..< n: for j in 0.cint ..< n:
let field = info.gUnionInfoGetField(j) let field = info.gUnionInfoGetField(j)