[Python-Dev] PyRange_New() alternative? (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Sat Jun 24 09:29:03 CEST 2006
- Previous message: [Python-Dev] PyRange_New() alternative?
- Next message: [Python-Dev] PyRange_New() alternative?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Scott David Daniels wrote:
I am not sure about your compiler, but if I remember the standard correctly, the following code shouldn't complain:
PyObjectCallFunction((PyObject*) (void *) &PyRangeType, "lll", start, start+len*step, step)
You remember the standard incorrectly. Python's usage of casts has undefined behaviour, and adding casts only makes the warning go away, but does not make the problem go away.
Regards, Martin
- Previous message: [Python-Dev] PyRange_New() alternative?
- Next message: [Python-Dev] PyRange_New() alternative?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]