Originally Posted by
Kempelen
I have a program with same .c and .h files and I want to inline a function that is widely used in a few .c files. As an inline function must be in the current file, the question are:
- Must I duplicate the inline function code in differents .c files in order to inline in various places.
- I have seen people sometimes put pure c code into .h file, so include that header in differents .c files avoidd the problem. I dont know if .h are designed for that, but sound to me like a wrong thing.
(my inline function is around 10 lines long, but it use extensibely a lot of precomputed matrix declared, so another question is if I must duplicate all those tables).