mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
only register initial varg struct on first pass (#2404)
This commit is contained in:
parent
368e8e85a8
commit
689003454b
@ -737,8 +737,10 @@ fn (p mut Parser) fn_args(f mut Fn) {
|
|||||||
}
|
}
|
||||||
t := p.get_type()
|
t := p.get_type()
|
||||||
// register varg struct, incase function is never called
|
// register varg struct, incase function is never called
|
||||||
vargs_struct := p.fn_register_vargs_stuct(f, t, []string)
|
if p.first_pass() {
|
||||||
p.cgen.typedefs << 'typedef struct $vargs_struct $vargs_struct;\n'
|
vargs_struct := p.fn_register_vargs_stuct(f, t, []string)
|
||||||
|
p.cgen.typedefs << 'typedef struct $vargs_struct $vargs_struct;\n'
|
||||||
|
}
|
||||||
typ = '...$t'
|
typ = '...$t'
|
||||||
} else {
|
} else {
|
||||||
typ = p.get_type()
|
typ = p.get_type()
|
||||||
|
Loading…
Reference in New Issue
Block a user