[Tim] >> Jeremy believed Py_UNICODE was already an unsigned type on his box, >> and that was the box with the segfaults. I don't know. Comparison >> with a signed int confused the issues to the point where we gave up >> and just fixed it <wink>. [M.-A. Lemburg] > That sounds more like compiler bug to me. It could be, but if so Jeremy is running on a mainstream Linux+gcc platform and then it's something we can't really wish away. Jeremy, can you tell us what Py_UNICODE resolves to on your box, or give enough details so someone else can figure it out? As I read the C standard, unsigned_int < 256 has to use unsigned comparison, so it's a compiler bug, or I'm misreading the standard, or Jeremy was mistaken in believing Py_UNICODE resolves to an unsigned thingie on his box (we know for sure that the bit pattern 0xcdcdcdcd compared less than 256 on his box; that's obviously what it should do if Py_UNICODE resolves to a signed 4-byte thing on his box, but not otherwise). > What's bothering me is that such compares are done in other places too, > so a more general solution would be better. I'd like to figure out what Jeremy's true problem was first -- we've got a solution to his symptom now, but don't really know why it was necessary.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4