]> git.cworth.org Git - glaze/commit
Add support for multiple Glaze wrappers to be used at the same time.
authorCarl Worth <cworth@cworth.org>
Mon, 23 Sep 2013 19:57:49 +0000 (12:57 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 23 Sep 2013 20:07:52 +0000 (13:07 -0700)
commit34d258542013821639bf8c4f60b0ae2c47e17091
tree86c8a52d521a2b76e301bdffbe6d2a9961f803c3
parent85faa290c2777d8e89af05648c229b0da395d4f7
Add support for multiple Glaze wrappers to be used at the same time.

We simply use a colon-separated specification of the wrappers in
GLAZE_WRAPPER and hold on to an array of dlopened handles.

It's a simple matter to use the array of handles in several places.

The one place that involves some delicacy is glaze_lookup. Here we
must ensure that one wrapper's wrapped implementation of a function
chains to the subsequent wrapper and not to itself (which would lead
to infinite recursion). To get this right, we inspect the backtrace
and refuse to let glaze_lookup return a function that already appears
in the backtrace.
glaze-gl.c
glaze.c
libglaze.c