1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

default struct vals

This commit is contained in:
Alexander Medvednikov
2019-11-24 13:53:59 +03:00
parent 7cc21be7de
commit 24b40be548
4 changed files with 21 additions and 2 deletions

View File

@@ -35,6 +35,7 @@ fn C.DefaultScreen() int
fn C.RootWindow() voidptr
fn C.BlackPixel() voidptr
fn C.WhitePixel() voidptr
fn C.XFree()
struct C.XSelectionRequestEvent{
mut:
@@ -329,7 +330,7 @@ fn read_property(d &Display, w Window, p Atom) Property {
ret := byteptr(0)
mut read_bytes := 1024
for {
if(ret != 0){
if ret != 0 {
C.XFree(ret)
}
XGetWindowProperty(d, w, p, 0, read_bytes, 0, C.AnyPropertyType, &actual_type, &actual_format, &nitems, &bytes_after, &ret)