Bif const: make sure const is indeed a constant.

This commit is contained in:
Gregor Maier 2011-02-14 10:43:26 -08:00
parent 782f007b5c
commit f3aa7b2fac
3 changed files with 13 additions and 1 deletions

View file

@ -466,7 +466,7 @@ const_def: TOK_CONST opt_ws TOK_ID opt_ws ':' opt_ws TOK_ID opt_ws ';'
decl.c_namespace_start.c_str(),
builtin_types[typeidx].c_type, decl.bare_name.c_str(),
decl.c_namespace_end.c_str());
fprintf(fp_netvar_init, "\t%s = internal_val(\"%s\")%s;\n",
fprintf(fp_netvar_init, "\t%s = internal_const_val(\"%s\")%s;\n",
decl.c_fullname.c_str(), decl.bro_fullname.c_str(),
accessor);
}