>>>>> "Pavel" == Pavel Machek <pavel@xxxxxx> writes: >> > Sorry for being late responding to this, but I'd say this is a >> prime > example for typedef's considered evil (see Greg's OLS talk >> ;). >> > >> > It would be a lot cleaner if it was made a struct and then >> passing a > struct pointer as the argument instead of passing the >> struct by value > as you do right now. >> >> Sorry, can't do that. That would require flag day and change >> everything at once. That is just not feasible. When things are >> settled, it is okay to change it to struct passed by value.. It is >> small anyway and at least we will not have problems with freeing it >> etc. Pavel> Well, we could switch to passing struct by reference Pavel> (typedef struct pm_message *pm_message_t) Pavel> , but AFAICS it would only bring us problems with lifetime Pavel> rules etc. Lets not do it. Pavel This way you end up hiding what is really going on, the very problem of using typedefs. If the change is really needed why not get it right in the first go? Cheers, Jes