Revert "Revert "Namespace C functions to avoid errors""

This reverts commit 5df175902966395bc90cf9bf0136fa6d0bf80dfc.