mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Change CGen so that v.c is compileable with msvc
This commit is contained in:

committed by
Alexander Medvednikov

parent
41f4ec5a3b
commit
049d78a78d
@ -544,7 +544,7 @@ fn type_default(typ string) string {
|
||||
}
|
||||
// User struct defined in another module.
|
||||
if typ.contains('__') {
|
||||
return '{}'
|
||||
return 'STRUCT_DEFAULT_VALUE'
|
||||
}
|
||||
// Default values for other types are not needed because of mandatory initialization
|
||||
switch typ {
|
||||
@ -566,7 +566,7 @@ fn type_default(typ string) string {
|
||||
case 'byteptr': return '0'
|
||||
case 'voidptr': return '0'
|
||||
}
|
||||
return '{}'
|
||||
return 'STRUCT_DEFAULT_VALUE'
|
||||
}
|
||||
|
||||
// TODO PERF O(n)
|
||||
|
Reference in New Issue
Block a user