There is no C API function for that. You have two options: punt to the Python API, or update your namespace manually.
If you want to punt to the Python API, you'd use something like PyRun_String to run from os.path import * with your module's __dict__ as globals and locals. It'd look something like this:
PyObject *borrowed_dict = PyModule_GetDict(your_module);
PyObject *ret = PyRun_String("from os.path import *",
Py_file_input,
borrowed_dict,
borrowed_dict);
if (!ret) {
// Error in import *!
// Appropriate response is context-dependent.
do_something_about_that();
}
Py_XDECREF(ret);
If you want to update your namespace manually, you should respect the imported module's __all__ list, or skip names with a leading underscore if there is no __all__ list. The Python-level way of doing it manually would be
if hasattr(module, '__all__'):
all_names = module.__all__
else:
all_names = [name for name in dir(module) if not name.startswith('_')]
globals().update({name: getattr(module, name) for name in all_names})
so translate that into the C API: retrieve the imported module's __all__ list, or build a default __all__ if the module doesn't provide one, then update your module's globals with the corresponding globals from the imported module.
It might help to look at how CPython itself implements the namespace updating part of import *.