Some inline never hurt anyone .. actually, C made a bad decision in it's design, everything should've always been implicitly inline, since most code back in the day was small, if you had large bodies, there should've been an 'outline' keyword for that instead :P

This commit is contained in:
Dale Weiler 2013-04-17 11:02:42 +00:00
parent 0b0b6423ba
commit dc7e18ec73

17
ftepp.c
View file

@ -227,7 +227,7 @@ static pptoken *pptoken_make(ftepp_t *ftepp)
return token;
}
static void pptoken_delete(pptoken *self)
static GMQCC_INLINE void pptoken_delete(pptoken *self)
{
mem_d(self->value);
mem_d(self);
@ -269,7 +269,7 @@ static ftepp_t* ftepp_new()
return ftepp;
}
static void ftepp_flush_do(ftepp_t *self)
static GMQCC_INLINE void ftepp_flush_do(ftepp_t *self)
{
vec_free(self->output_string);
}
@ -282,13 +282,6 @@ static void ftepp_delete(ftepp_t *self)
if (self->includename)
vec_free(self->includename);
/*
for (i = 0; i < vec_size(self->macros); ++i)
ppmacro_delete(self->macros[i]);
vec_free(self->macros);
*/
util_htrem(self->macros, (void (*)(void*))&ppmacro_delete);
vec_free(self->conditions);
@ -309,7 +302,7 @@ static void ftepp_out(ftepp_t *ftepp, const char *str, bool ignore_cond)
}
}
static void ftepp_update_output_condition(ftepp_t *ftepp)
static GMQCC_INLINE void ftepp_update_output_condition(ftepp_t *ftepp)
{
size_t i;
ftepp->output_on = true;
@ -317,12 +310,12 @@ static void ftepp_update_output_condition(ftepp_t *ftepp)
ftepp->output_on = ftepp->output_on && ftepp->conditions[i].on;
}
static ppmacro* ftepp_macro_find(ftepp_t *ftepp, const char *name)
static GMQCC_INLINE ppmacro* ftepp_macro_find(ftepp_t *ftepp, const char *name)
{
return util_htget(ftepp->macros, name);
}
static void ftepp_macro_delete(ftepp_t *ftepp, const char *name)
static GMQCC_INLINE void ftepp_macro_delete(ftepp_t *ftepp, const char *name)
{
util_htrm(ftepp->macros, name, NULL);
}