}
/** Initialized by \c CODE_PROPS_NONE_INIT with no further modification. */
-extern code_props const code_props_none;
+extern code_props code_props_none;
/**
* \pre
*self = code_props_none;
}
-code_props const code_props_none = CODE_PROPS_NONE_INIT;
+code_props code_props_none = CODE_PROPS_NONE_INIT;
void
code_props_plain_init (code_props *self, char const *code,
| Get the computed %destructor or %printer for SYM. |
`---------------------------------------------------*/
-code_props const *
-symbol_code_props_get (symbol const *sym,
- code_props_type kind)
+code_props *
+symbol_code_props_get (symbol *sym, code_props_type kind)
{
/* Per-symbol code props. */
if (sym->props[kind].code)
/* Per-type code props. */
if (sym->type_name)
{
- code_props const *code =
+ code_props *code =
&semantic_type_get (sym->type_name, NULL)->props[kind];
if (code->code)
return code;
}
for (int i = 0; i < 2; ++i)
- if (sym->props[i].kind == CODE_PROPS_NONE && sym->type_name)
- {
- semantic_type *sem_type = semantic_type_get (sym->type_name, NULL);
- if (sem_type
- && sem_type->props[i].kind != CODE_PROPS_NONE)
- sem_type->props[i].is_used = true;
- }
+ symbol_code_props_get (sym, i)->is_used = true;
/* Set the semantic type status associated to the current symbol to
'declared' so that we could check semantic types unnecessary uses. */
/** Get the computed \c \%destructor or \c %printer for \c sym, which was
initialized with \c code_props_none_init if there's no \c \%destructor or
\c %printer. */
-code_props const *symbol_code_props_get (symbol const *sym,
- code_props_type kind);
+code_props *symbol_code_props_get (symbol *sym, code_props_type kind);
/** Set the \c precedence associated with \c sym.