API compatibility
Tsuda Kageyu
tsuda.kageyu at gmail.com
Sat Jun 1 18:43:41 UTC 2013
Oh! I missed your point.
Now, I see what you are saying. Certainly, the behavior of the fuction
has been changed. The check should be like this:
if(offset + (patternLength - patterOffset) > size() || patternOffset >
= pattern.size() ||
patternLength == 0)
I'll fix it soon. Thanks.
Kageyu.
>Yea, I agree the API may not be broke, I don't know what I was thinking when
>I used that for a title and what not ... To many hours in the seat!
>
>However unless I'm wacky (and that is highly likely) there is a logic issue ...
>
>Example:
>i=blah blah
>j=blah
>
>Works: i->containsAt(j, 5, 0)
>Fails: i->containsAt(j, 6, 1)
>Works: i->containsAt(j, 6, 1, 3)
>
>
>-Enjoy
>fh [color=#FF0000]:[/color] )_~
>
>
> From: Tsuda Kageyu <tsuda.kageyu at gmail.com>
>To: Festus Hagen <festushagenlists at yahoo.com>; taglib-devel at kde.org
>Sent: Saturday, June 1, 2013 1:56 PM
>Subject: Re: API compatibility
>
>
>Hi fh.
>
>The checks are equivalent in practice so it does not break the API.
>
>Kageyu.
>
>>Hi
>>
>>In commit "Reduce unnecessary memory copies by ByteVector", in function
>>"containsAt(...)" there was a change made to the sanity checking.
>>
>>Does this NOT break the API ?
>>
>>The code ... (messed by yahoo)
>> // do some sanity checking -- all of these things are needed for the search
>>to be valid
>>
>>- if(patternLength > size() || offset >= size() || patternOffset >= pattern.
>>size() || patternLength == 0)
>>+ if(offset + patternLength > size() || patternOffset >= pattern.size() ||
>>patternLength == 0)
>>
>>-Enjoy
>>fh : )_~
>>
>>
>>-------------------------------text/plain-------------------------------
>>_______________________________________________
>>taglib-devel mailing list
>>[a:mailto:taglib-devel at kde.org]taglib-devel at kde.org
>>[a:https://mail.kde.org/mailman/listinfo/taglib-devel]https://mail.kde.org/
>>mailman/listinfo/taglib-devel
>>
>>-------------------------------text/plain-------------------------------
>>_______________________________________________
>>taglib-devel mailing list
>>[a:mailto:taglib-devel at kde.org]taglib-devel at kde.org
>>[a:https://mail.kde.org/mailman/listinfo/taglib-devel]https://mail.kde.org/
>>mailman/listinfo/taglib-devel
>
>
>-------------------------------text/plain-------------------------------
>_______________________________________________
>taglib-devel mailing list
>taglib-devel at kde.org
>https://mail.kde.org/mailman/listinfo/taglib-devel
>
>-------------------------------text/plain-------------------------------
>_______________________________________________
>taglib-devel mailing list
>taglib-devel at kde.org
>https://mail.kde.org/mailman/listinfo/taglib-devel
More information about the taglib-devel
mailing list