Hacking on The Core — it's good for the soul!
PYK 2015-04-25: I'm still learning the ropes of C, but I'll throw these here anyway. They came in handy recently to debug an I/O/thread issue.
#define tdebug(statement) do { \ fprintf(stderr, "%p: %s\n", Tcl_GetCurrentThread(), (statement)); \ } while (0) #define tcdebug(statePtr, statement) do { \ fprintf(stderr, "%p: chan %s: %s\n", Tcl_GetCurrentThread(), (statePtr->channelName), (statement)); \ } while (0)