mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: detect and error on public init function & remove empty init functions
This commit is contained in:

committed by
Alexander Medvednikov

parent
065ce39577
commit
a06e2298f0
@ -20,13 +20,12 @@ const (
|
||||
WSA_V22 = 0x202 // C.MAKEWORD(2, 2)
|
||||
)
|
||||
|
||||
fn init() int {
|
||||
fn init() {
|
||||
mut wsadata := C.WSAData{}
|
||||
res := C.WSAStartup(WSA_V22, &wsadata)
|
||||
if res != 0 {
|
||||
panic('socket: WSAStartup failed')
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
fn error_code() int {
|
||||
|
Reference in New Issue
Block a user