Yaroslav Kavenchuk kavenchuk@jenty.by writes:
Hoehle, Joerg-Cyril wrote:
And if I shall link some libraries with identical names of functions - what to do?
"Implementation-dependent" and underspecified
no perfection in the world :(
I would like, eventually, to extend CFFI to allow for this case, as it would come up all the time in a program that wanted to load "plugin" style shared objects.
For example, one way to handle this would be for LOAD-FOREIGN-LIBRARY to return a cookie that can be used to refer to a specific shared library. Then, functions defined with DEFCFUN could take an extra :library keyword argument that would be used to specify which library to resolve the function in. (We'd need a way to extend FOREIGN-FUNCALL to do this too: probably a FOREIGN-FUNCALL-IN-LIBRARY operator or something.)
I'm not sure what the status of implementation support on something like this would be...
James