Assuming I have some embedded python code containing a function foo, what is the best way to get a reference to that function (for use with PyObject_CallObject)?
One way is to have some function register each function along with the function name either manually or through use of reflection. This seems like overkill.
Another way is to create a "loader" function that takes the function name and returns a reference to the function. Better, but I still have to register the loader function with C.
Am I missing a better way to do this with or without having to write any additional python code?