Message117324
> issue9783.diff provides a patch that will compile clean on 32 and 64 > bit Windows systems. I tried to avoid explicit casts where I could, > but it was not always possible. I have ported a lot of my company's > code to 64 bit (all Windows based). In my experience many warnings > are because of programmers using the int type in places where a > size_t may be more appropriate. Most of the warnings here are due to > mixing int and Py_ssize_t types. I think the patch is incorrect as it stands: the casts may cause truncation. As you say, int is still being used where size_t was more appropriate, so I think we should change it in that manner (e.g. make element_resize accept Py_ssize_t). In cases where we really can't propagate Py_ssize_t to (e.g. XML_Parse), we need to check for an int overflow, and raise an exception if it does overflow. | |
| Date | User | Action | Args | | 2010-09-24 18:32:14 | loewis | set | recipients: + loewis, effbot, pitrou, janglin, flox | | 2010-09-24 18:32:12 | loewis | link | issue9783 messages | | 2010-09-24 18:32:12 | loewis | create | | |