List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:May 21 2011 11:18am
Subject:Re: bzr commit into mysql-trunk branch (tor.didriksen:3309) WL#4800
View as plain text  
Hello,

Tor Didriksen a écrit, Le 20.05.2011 15:52:
> On 2011-05-20 15:17, Guilhem Bichot wrote:
>>> === modified file 'sql/sql_array.h'
>>> --- a/sql/sql_array.h    2011-04-05 07:34:13 +0000
>>> +++ b/sql/sql_array.h    2011-05-19 10:55:07 +0000
>>> @@ -73,6 +73,7 @@ public:
>>>       Pops the last element. The returned element must not be used 
>>> after the
>>>       next update to the array.
>>>    */
>>> +  // This interface is still wrong!!
>>
>> Sure... but in what sense?
> well, you changed it, but didn't really fix it.
> a pop() should return void, in order to prevent misuse.
> 
> your fix disallows writing into the returned element, but clients can 
> still read it,
> even after something has been appended to the array.
> they will then be reading the newly pushed element, rather than what 
> they popped.
> 
> I'm guessing you changed it because you were *writing* into it ?

I think I wasn't writing to it, it's just that when I added pop() I 
didn't think about const, then later I thought const was a good addition.
pop() is now void, this is pushed; could you please have a look?
Btw, what about other questions in my mail?

Thread
bzr commit into mysql-trunk branch (tor.didriksen:3309) WL#4800Tor Didriksen19 May
  • Re: bzr commit into mysql-trunk branch (tor.didriksen:3309) WL#4800Jorgen Loland19 May
    • Re: bzr commit into mysql-trunk branch (tor.didriksen:3309) WL#4800Jorgen Loland19 May
    • Re: bzr commit into mysql-trunk branch (tor.didriksen:3309) WL#4800Guilhem Bichot20 May
      • Re: bzr commit into mysql-trunk branch (tor.didriksen:3309) WL#4800Jorgen Loland20 May
  • Re: bzr commit into mysql-trunk branch (tor.didriksen:3309) WL#4800Guilhem Bichot20 May
    • Re: bzr commit into mysql-trunk branch (tor.didriksen:3309) WL#4800Tor Didriksen20 May
      • Re: bzr commit into mysql-trunk branch (tor.didriksen:3309) WL#4800Guilhem Bichot21 May