Closed olibertrand closed 3 years ago
It doesn't, because the word static
means it's not visible outside the debug.c
file anyway. No other source file needs that function. Only functions that other source files might need access to need to be declared in a header file.
@jcgoble3 is right. :) It doesn't need to be in the header. (As you get farther into the C implementation, you'll see lots more static functions that aren't in the headers.)
makes sense - sorry for the distraction. I had written it after a non-static declaration, which explains the compilation failure.
Hi, Thank you for this fantastic work, I'm getting each day deeper in it. I'll write a note when I'll have integrated most of it.
For now I just wanted to point a small omission in 14.5.3: the declaration
static int constantInstruction(const char* name, Chunk* chunk,int offset);
has to be added in debug.h (yeah, it's obvious - just to keep as precise as the rest of the book)regards - you're enlightening my life Olivier Bertrand