Isolating references to C extensions