diff --git a/gintro/cairo.nim b/gintro/cairo.nim index 506ad74..363a1f2 100644 --- a/gintro/cairo.nim +++ b/gintro/cairo.nim @@ -138,7 +138,7 @@ type x*: cdouble y*: cdouble - PathData00* = object {.union.} + PathData00* {.union.} = object header*: INNER_C_STRUCT_3330700347 point*: INNER_C_STRUCT_1651263489 diff --git a/gintro/gimpl.nim b/gintro/gimpl.nim index d46fac5..7e4757f 100644 --- a/gintro/gimpl.nim +++ b/gintro/gimpl.nim @@ -85,9 +85,11 @@ proc $1$2 {.cdecl.} = ipos = i break 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: - 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: ipro = $(ipronode.toStrLit) var ipros = hargs[ipos].split(" | ") diff --git a/tests/gen.nim b/tests/gen.nim index 1012910..e6a92e4 100644 --- a/tests/gen.nim +++ b/tests/gen.nim @@ -1,5 +1,5 @@ # 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 # https://wiki.gnome.org/Projects/GObjectIntrospection @@ -880,7 +880,8 @@ proc writeMethod(info: GIBaseInfo; minfo: GIFunctionInfo; genProxy = false) = proc writeUnion(info: GIUnionInfo) = if not suppressType: 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() for j in 0.cint ..< n: let field = info.gUnionInfoGetField(j)