Revert "Change env_get_char from a global function ptr to a function."