diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-01-09 10:36:51 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-01-09 13:43:06 -0500 |
| commit | 5ab5de89c03bf9b3f08dfaa78d3b0fe41a72cdea (patch) | |
| tree | c93dcfb6b6dad6d52d8d03e1d1a4601da5f04a3c /src/analyze.cpp | |
| parent | 4613e4d15f85406d23f91134a9ec5854da33965f (diff) | |
| download | zig-5ab5de89c03bf9b3f08dfaa78d3b0fe41a72cdea.tar.gz zig-5ab5de89c03bf9b3f08dfaa78d3b0fe41a72cdea.zip | |
New @export() handling
Use a struct as second parameter to be future proof (and also allows to
specify default values for the parameters)
Closes #2679 as it was just a matter of a few lines of code.
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index a19b56cc9d..7fd26afc84 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -3955,8 +3955,8 @@ static void resolve_decl_var(CodeGen *g, TldVar *tld_var, bool allow_lazy) { } if (var_decl->section_expr != nullptr) { - if (!analyze_const_string(g, tld_var->base.parent_scope, var_decl->section_expr, &tld_var->section_name)) { - tld_var->section_name = nullptr; + if (!analyze_const_string(g, tld_var->base.parent_scope, var_decl->section_expr, &tld_var->var->section_name)) { + tld_var->var->section_name = nullptr; } } |
