--- gvpe/src/callback.pl 2005/03/03 16:54:34 1.4 +++ gvpe/src/callback.pl 2006/01/14 11:21:12 1.8 @@ -1,16 +1,13 @@ #!/usr/bin/perl print < + Copyright (C) 2003-2006 Marc Lehmann This file is part of GVPE. @@ -26,7 +23,7 @@ You should have received a copy of the GNU General Public License along with gvpe; if not, write to the Free Software - Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef CALLBACK_H__ @@ -52,13 +49,13 @@ /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth)($TYPE)$_TYPEARG) = 0; + virtual R call (void *obj, R (object::*meth)($TYPE)$_TYPEARG) const = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth)($TYPE)$_TYPEARG) + virtual R call (void *obj, R (object::*meth)($TYPE)$_TYPEARG) const { - ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) + return (R)((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) ($ARG); } }; @@ -67,7 +64,7 @@ public: template - callback$a (O1 *object, R (O2::*method)($TYPE)) + explicit callback$a (O1 *object, R (O2::*method)($TYPE)) { static proxy p; obj = reinterpret_cast(object);