X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fparser.h;h=fe3ff8e8759b9aacbd7f21ce1b5b307438abfa13;hp=4e5e0648351d4abcb8eb53b26186635b31dfb341;hb=9f381458672347c0f303dc3b309dc299f998f4f6;hpb=f6b2422d4a9cb0424412a4077241cfd5bcb9ebeb diff --git a/src/parser.h b/src/parser.h index 4e5e064..fe3ff8e 100644 --- a/src/parser.h +++ b/src/parser.h @@ -405,12 +405,14 @@ static inline void free_impl_func(impl_func *f) { typedef struct let_func { token_t type; char *name; + size_t size; } let_func; -static inline let_func *init_let_func(token_t type, char *name) { +static inline let_func *init_let_func(token_t type, char *name, size_t size) { let_func *func = malloc(sizeof(*func)); func->type = type; - func->name = (char *) strdup((const char *) name); + func->name = strdup(name); + func->size = size; return func; }