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

checker: disallow assigning number to pointer (#7267)

This commit is contained in:
Nick Treleaven
2020-12-12 09:42:07 +00:00
committed by GitHub
parent 5fec0d785a
commit d785e22a6e
10 changed files with 47 additions and 22 deletions

View File

@ -425,9 +425,7 @@ fn (cb &Clipboard) get_supported_targets() []C.Atom {
}
fn new_atom(value int) &C.Atom {
mut atom := &C.Atom{}
atom = value
return atom
return unsafe {&C.Atom(value)}
}
fn create_xwindow(display &C.Display) C.Window {