Noboru Uchida wrote:
Problem: Dib.draw() fails occasionally and raises Overflow Error.
Reason:
In display.c, Window Handles(HWND) and Device Contexts(HDC) are both
declared as "int".
HWND/HDC arguments are parsed by PyArg_ParseTuple(), using format "i".
"i" converts Python integer to plain C integer, but when the value is
greater than 0x7fffffff, it seems to fail in Overflow Error.
The problem is, HWND/HDC *can* take such values.
I think unsigned integer and Format "I" would fix this problem.
Thanks.
I suspect that this is a C API incompatibility introduced by the PEP 237
activities back in 2.2 or 2.3 (the "I" formatting code was introduced in
2.3), but it's definitely a bug.
</F>
_______________________________________________
Image-SIG maillist - Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig