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
@ -16,9 +16,8 @@ pub struct Mutex {
|
||||
mutex C.pthread_mutex_t
|
||||
}
|
||||
|
||||
pub fn new_mutex() Mutex {
|
||||
m := Mutex{
|
||||
}
|
||||
pub fn new_mutex() &Mutex {
|
||||
m := &Mutex{}
|
||||
C.pthread_mutex_init(&m.mutex, C.NULL)
|
||||
return m
|
||||
}
|
||||
|
Reference in New Issue
Block a user