After learning this I'm much more willing to overlook the errors in FFI's code. Considering that it was a one-man job, I'm more impressed than ever now.