X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fparser.h;h=9ec15b9b7825ba47ab7c88e716bd1b32248032fb;hp=cd1e0d4b253fa489fd368eb6a83eb01123aa4305;hb=0aa69939e1a89ad7647ee853a742b8b7cc37f75f;hpb=665b431c0b92dcb3b261d0365d057a6ace711e19 diff --git a/src/parser.h b/src/parser.h index cd1e0d4..9ec15b9 100644 --- a/src/parser.h +++ b/src/parser.h @@ -367,7 +367,7 @@ typedef struct impl_var { static inline impl_var *init_impl_var(char *name, int is_reference) { impl_var *var = calloc(1, sizeof(*var)); - var->name = (char *) strdup((const char *) name); + var->name = strdup(name); var->reference = is_reference; return var; } @@ -382,10 +382,10 @@ typedef struct impl_def_val { char *text; } impl_def_val; -static inline impl_def_val *init_impl_def_val(PSI_Token *T) { +static inline impl_def_val *init_impl_def_val(token_t t, char *text) { impl_def_val *def = calloc(1, sizeof(*def)); - def->type = T->type; - def->text = strdup(T->text); + def->type = t; + def->text = strdup(text); return def; } @@ -950,4 +950,3 @@ void PSI_ParserDtor(PSI_Parser *P); void PSI_ParserFree(PSI_Parser **P); #endif -