mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
parent
a98376025e
commit
6e4dc82f28
3 changed files with 12 additions and 2 deletions
|
@ -59,7 +59,7 @@ pub:
|
|||
}
|
||||
|
||||
pub fn new_channel[T](n u32) &Channel {
|
||||
st := sizeof(T)
|
||||
st := if sizeof(T) > 0 { sizeof(T) } else { 1 }
|
||||
if isreftype(T) {
|
||||
return new_channel_st(n, st)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue