Bugfix: code generation bug that affected dialogs.nim

This commit is contained in:
Andreas Rumpf
2010-03-25 19:11:17 +01:00
parent a8f6d307a9
commit 3ff6354a7c
4 changed files with 13 additions and 2 deletions

View File

@@ -5373,7 +5373,7 @@ const
RESPONSE_ACCEPT* = - cint(3)
RESPONSE_DELETE_EVENT* = - cint(4)
RESPONSE_OK* = - cint(5)
RESPONSE_CANCEL* = - cint(6)
RESPONSE_CANCEL* = cint(-6)
RESPONSE_CLOSE* = - cint(7)
RESPONSE_YES* = - cint(8)
RESPONSE_NO* = - cint(9)
@@ -16652,6 +16652,7 @@ proc file_chooser_dialog_new*(title: cstring, parent: PWindow,
action: TFileChooserAction,
first_button_text: cstring): PFileChooser{.cdecl,
varargs, dynlib: lib, importc: "gtk_file_chooser_dialog_new".}
proc file_chooser_dialog_new_with_backend*(title: cstring, parent: PWindow,
action: TFileChooserAction, backend: cstring, first_button_text: cstring): PFileChooser{.
varargs, cdecl, dynlib: lib,

View File

@@ -63,7 +63,7 @@ proc genLiteral(p: BProc, v: PNode, ty: PType): PRope =
result = ropef("(($1) $2)", [getTypeDesc(p.module,
skipTypes(ty, abstractVarRange)), intLiteral(v.intVal)])
of nkNilLit:
result = toRope("0")
result = toRope("NIM_NIL")
of nkStrLit..nkTripleStrLit:
if skipTypes(ty, abstractVarRange).kind == tyString:
var id = NodeTableTestOrSet(p.module.dataCache, v, gid)

View File

@@ -0,0 +1,8 @@
type
PNode = ref TNode
TNode = tuple[self: PNode]
var node: PNode
new(node)
node.self = node

View File

@@ -0,0 +1,2 @@
echo()