API compatibility

Festus Hagen festushagenlists at yahoo.com
Sat Jun 1 18:20:52 UTC 2013


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
>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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20130601/b113ad15/attachment.html>


More information about the taglib-devel mailing list