mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
sync: make new_mutex() and new_waitgroup() return &Mutex and &Waitgroup
This commit is contained in:

committed by
Alexander Medvednikov

parent
bc64263dd8
commit
0d52cc97e4
@@ -103,7 +103,7 @@ pub struct Clipboard {
|
||||
selection Atom //the selection atom
|
||||
window Window
|
||||
atoms []Atom
|
||||
mutex sync.Mutex
|
||||
mutex &sync.Mutex
|
||||
text string // text data sent or received
|
||||
got_text bool // used to confirm that we have got the text
|
||||
is_owner bool // to save selection owner state
|
||||
@@ -137,7 +137,7 @@ fn new_x11_clipboard(selection atom_type) &Clipboard {
|
||||
|
||||
if display == C.NULL {
|
||||
println("ERROR: No X Server running. Clipboard cannot be used.")
|
||||
return &Clipboard{ display: 0 }
|
||||
return &Clipboard{ display: 0 mutex: sync.new_mutex() }
|
||||
}
|
||||
|
||||
mut cb := &Clipboard{
|
||||
|
Reference in New Issue
Block a user