Why are these free functions written in C?