Make C API independent of the C++ API