diff --git a/vlib/clipboard/clipboard_linux.c.v b/vlib/clipboard/clipboard_linux.c.v index 3a3b215c6b..d61925c93b 100644 --- a/vlib/clipboard/clipboard_linux.c.v +++ b/vlib/clipboard/clipboard_linux.c.v @@ -11,8 +11,13 @@ import math // X11 struct C.Display{} -struct C.Atom{} -struct C.Window{} + +[typedef] +struct C.Atom + +[typedef] +struct C.Window + fn C.XInitThreads() int fn C.XCloseDisplay(d &Display) fn C.XFlush(d &Display) @@ -46,6 +51,8 @@ struct C.XSelectionRequestEvent{ property C.Atom time int } + +[typedef] struct C.XSelectionEvent{ mut: @type int @@ -56,15 +63,20 @@ struct C.XSelectionEvent{ property C.Atom time int } + +[typedef] struct C.XSelectionClearEvent{ mut: window C.Window selection C.Atom } + struct C.XDestroyWindowEvent { mut: window C.Window } + +[typedef] struct C.XEvent{ mut: @type int diff --git a/vlib/strings/builder.c.v b/vlib/strings/builder.c.v index 00739206a4..9fe483a12a 100644 --- a/vlib/strings/builder.c.v +++ b/vlib/strings/builder.c.v @@ -104,9 +104,7 @@ pub fn (b mut Builder) free() { unsafe{ free(b.buf.data) } - // QTODO checker bug - s := b.initial_size - //b.buf = []byte{cap: s} + //b.buf = []byte{cap: b.initial_size} b.len = 0 b.str_calls = 0 }