mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: make bool
s take up a single byte, not 4 (#9352)
This commit is contained in:
@ -211,7 +211,8 @@ pub fn (mut s UdpSocket) set_option_bool(opt SocketOption, value bool) ? {
|
||||
// if opt !in opts_bool {
|
||||
// return err_option_wrong_type
|
||||
// }
|
||||
socket_error(C.setsockopt(s.handle, C.SOL_SOCKET, int(opt), &value, sizeof(bool))) ?
|
||||
x := int(value)
|
||||
socket_error(C.setsockopt(s.handle, C.SOL_SOCKET, int(opt), &x, sizeof(int))) ?
|
||||
return none
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user