1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

"none" keyword for optionals + more memory fixes

This commit is contained in:
Alexander Medvednikov
2019-09-17 22:41:58 +03:00
parent e40ab547ba
commit d1500511e6
12 changed files with 273 additions and 204 deletions

View File

@ -315,8 +315,9 @@ fn (v &V) type_definitions() string {
// sort structs
types_sorted := sort_structs(types)
// Generate C code
return types_to_c(builtin_types,v.table) + '\n//----\n' +
res := types_to_c(builtin_types,v.table) + '\n//----\n' +
types_to_c(types_sorted, v.table)
return res
}
// sort structs by dependant fields