StringList iterator order changed from 1.8 to 1.9.1?

Jacob Vosmaer contact at jacobvosmaer.nl
Sun Mar 2 18:51:48 UTC 2014


Hi taglib-devel list,

My name is Jacob Vosmaer and I am one of the maintainers of taglib-ruby
https://github.com/robinst/taglib-ruby , a Ruby wrapper for TagLib. I have
been having some issues with our test suite when compiling against TagLib
1.9.1 on OS X 10.9 (TagLib installed via Homebrew). I can reproduce one of
the issues with the short program below:

#include <stdlib.h>
#include <taglib/tstringlist.h>

int main(int argc, char **argv) {
  TagLib::StringList mylist;

  mylist.append("one");
  mylist.append("two");
  mylist.append("three");

  printf("mylist.toString():\t%s\n", mylist.toString().toCString());

  printf("mylist ConstIterator:\t");
  for (TagLib::StringList::ConstIterator it = mylist.begin(); it !=
mylist.end(); it++) {
    printf("%s ", it->toCString());
  }
  printf("\n");
}

If I compile this program against TagLib 1.7.2 or 1.8, I get the following
output:

mylist.toString(): one two three
mylist ConstIterator: one two three

If I compile against TagLib 1.9.1 on the other hand, I get:

mylist.toString(): one two three
mylist ConstIterator: three two one

Is this the expected behavior?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20140302/47fac83e/attachment.html>


More information about the taglib-devel mailing list