
Sorry, I couldn't help noticing this:
if sys.maxsize < 2**32: offset = tid & 0xFFFF # 32bit
0xFFFF is not 32 bit, it's 16 bit.. Should that be 0xFFFFFFFF instead? -alex On Apr 22, 2015 9:43 AM, "Armin Rigo" <arigo@tunes.org> wrote:
Hi Maciej,
On 22 April 2015 at 08:59, Maciej Fijalkowski <fijall@gmail.com> wrote:
Are you sure this is unsigned? IMO I've seen '0xffffffd5' or something like that.
As far as I can tell, the C code contains the declaration "Signed h_tid;". So I would guess that hdr['h_tid'] returns a signed integer. The next line masks it to a number between 0 and 2**32-1, so then -42 would become 0xffffffd5. But I didn't actually check; please fix if I'm wrong.
A bientôt,
Armin. _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev