homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients amaury.forgeotdarc, brian.curtin, janglin, loewis, pitrou, schmir, vstinner
Date 2011年01月11日.01:13:37
SpamBayes Score 0.00071597646
Marked as misclassified No
Message-id <1294708423.05.0.406559786751.issue9566@psf.upfronthosting.co.za>
In-reply-to
Content
... and issue9566.patch: various fixes. Interesting parts:
---
- id = PyLong_FromLong((Py_uintptr_t) self);
+ id = PyLong_FromVoidPtr(self);
---
---
 LOCAL(PyObject*)
-expat_parse(XMLParserObject* self, char* data, int data_len, int final)
+expat_parse(XMLParserObject* self, char* data, Py_ssize_t data_len, int final)
 {
 int ok;
 
- ok = EXPAT(Parse)(self->parser, data, data_len, final);
+ if (data_len > INT_MAX) {
+ PyErr_SetString(PyExc_OverflowError, "length doesn't fit in an int");
+ return NULL;
+ }
+
+ ok = EXPAT(Parse)(self->parser, data, (int)data_len, final);
---
---
- long hash = PyObject_Hash(arg);
+ Py_hash_t hash = PyObject_Hash(arg);
---
History
Date User Action Args
2011年01月11日 01:13:43vstinnersetrecipients: + vstinner, loewis, amaury.forgeotdarc, pitrou, schmir, brian.curtin, janglin
2011年01月11日 01:13:43vstinnersetmessageid: <1294708423.05.0.406559786751.issue9566@psf.upfronthosting.co.za>
2011年01月11日 01:13:38vstinnerlinkissue9566 messages
2011年01月11日 01:13:38vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /