[Clam-devel] TypedControls Patch
parumi at iua.upf.edu
Sun May 11 03:13:14 PDT 2008
On ds, 2008-05-10 at 13:29 -0300, Francisco Tufró wrote:
> If you pass them by reference you can't do a SendControl(1) because
> that is passed by copy.
> So, i got confused with your mail.
> > out.SendControl(1); won't work because the signature wants reference
> > to a non-constant var! And we need it to work, for backwards
> > compatibility among other reasons.
Yes, and keep reading :-)
> > So change the test passing a constant, and pass the test by changing
> > SendControl and DoControl arguments to be const references.
> So, i think what pau meant is that the class is passed by copy.
> If you pass it by reference you can't do a SendControl(1).
> So please talk with each other and tell me what to do :(
No, we both are saying the same.
Ok, i guess the confusion lies in "passing tokens by copy (opposed to
passing a reference)" vs "passing method arguments by copy". We want the
first but not the second. that is, we want to do a copy of the sent
token but only one copy, at the receiving point.
To make it crystal clear see this patch. This keeps the tests green.
(the patch has been commited).
Makes sense now?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3035 bytes
Desc: not available
More information about the clam-devel