mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
module caching: generate type aliases
This commit is contained in:
@@ -172,6 +172,10 @@ fn (v &V) generate_vh() {
|
||||
if typ.name.contains('__') {
|
||||
name = typ.name.all_after('__')
|
||||
}
|
||||
// type alias
|
||||
if typ.parent != '' && typ.cat == .alias {
|
||||
file.writeln('type $typ.name $typ.parent')
|
||||
}
|
||||
if typ.cat in [TypeCategory.struct_, .c_struct] {
|
||||
c := if typ.is_c { 'C.' } else { '' }
|
||||
file.writeln('struct ${c}$name {')
|
||||
|
Reference in New Issue
Block a user