]> git.cworth.org Git - fips/commit
Add a new GLWRAP_DEFER_WITH_RETURN macro.
authorCarl Worth <cworth@cworth.org>
Mon, 10 Jun 2013 21:40:43 +0000 (14:40 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 10 Jun 2013 21:48:26 +0000 (14:48 -0700)
commit65892e28812cc06cceba26c22caca6e6b83960e0
tree7472a50b87dc6a479ca294ad85d765c2f58dba9f
parent377222f13763b1b7b78bf558ab9ac8b70535c96d
Add a new GLWRAP_DEFER_WITH_RETURN macro.

This allows for the elimination of some code duplication from our
implementation of glXGetPrcAddressARB. The previous implementation
duplicated code from glwrap_lookup simply because the GLWRAP_DEFER
macro did not provide access to the return value of the wrapped
function.

With the new macro, (very much like GLWRAP_DEFER but accepting a
parameter for a variable to accept the return value), we can eliminate
this code duplication.

Of course, our symbol-extraction script is now a bit more complicated
since it has to find occurrences of DEFER_WITH_RETURN in addition to
occurrences of DEFER, and pull out the function name as the second
argument rather than the first.
extract-wrapped-symbols
glwrap.h
glxwrap.c