--- gvpe/src/callback.pl 2005/04/26 00:55:55 1.5 +++ 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. @@ -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);