Conversation
Apparently some compilers don't support that.
Replace a while loop with complicated break and continue cases by a for loop that has the iteration and end-condition testing in one place only.
Having the prev and next iterators is not much worse than indexing the vector, and initializing the vector became too verbose.
|
Compiles and tests pass on ubuntu 12.04 with freetype 2.4.8 (with the unrelated exception of the one test in #939) |
|
I just pushed a merge of another branch touching this, which reportedly fixes #937. (The previous comment by jdh2358 predates the push, although github shows the commits above it.) Compiles and passes at least test_ttconv and test_text on MacOSX 10.6.8, Python 2.7.2. |
|
IMHO we could merge this now. The problem in #937 was that for some reason the Microsoft compiler didn't recognize the STL idiom I used to convert a list into a vector, and this version doesn't create the vector at all. The crash in #933 was because the code accessed memory past the end of the (empty) vector, even though it didn't use the result for anything - presumably the compiler I was using had optimized away the read, but another compiler had not. This version has a check against that case, so I don't think that crash can occur. |
|
OK, I'm merging and cutting rc2. If there are additional problems we can fix them before the final release. |
Replace a while loop with complicated break and continue cases by a for loop that has the iteration and end-condition testing in one place only.
This was last touched by @mdboom and @cgohlke in #933; does this look right and does the #933 crash stay fixed?