A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-June/066466.html below:

[Python-Dev] PyRange_New() alternative?

[Python-Dev] PyRange_New() alternative? [Python-Dev] PyRange_New() alternative?"Martin v. Löwis" martin at v.loewis.de
Sat Jun 24 09:29:03 CEST 2006
Scott David Daniels wrote:
> I am not sure about your compiler, but if I remember the standard
> correctly, the following code shouldn't complain:
> 
>     PyObject_CallFunction((PyObject*) (void *) &PyRange_Type,
>                           "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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4