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/2012-May/119465.html below:

[Python-Dev] void* <-> size_t

[Python-Dev] void* <-> size_t [Python-Dev] void* <-> size_tSerhiy Storchaka storchaka at gmail.com
Sun May 13 16:28:15 CEST 2012
On 13.05.12 12:48, Stefan Krah wrote:
> The C standard doesn't guarantee sizeof(void *) == sizeof(size_t). In
> fact, there are machines where sizeof(void *)>  sizeof(size_t):
>
> http://comments.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/651
> http://www-01.ibm.com/support/docview.wss?uid=swg27019425

I noticed recently that the code is often used unsafe casting void* -> 
size_t and size_t -> void*. For example:

     const char *aligned_end = (const char *) ((size_t) end & 
~LONG_PTR_MASK);

I defer this issue until issues 14624 and 14624 will be resolved (same 
method is used in the suggested patches), but once it already mentioned, 
should be replaced size_t to Py_uintptr_t in all such castings?

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