C API additions