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/2009-January/085021.html below:

[Python-Dev] Add Py_off_t and related APIs?

[Python-Dev] Add Py_off_t and related APIs? [Python-Dev] Add Py_off_t and related APIs?Antoine Pitrou solipsis at pitrou.net
Tue Jan 13 20:17:26 CET 2009
Martin v. Löwis <martin <at> v.loewis.de> writes:
> 
> -1. How many functions actually require that type?

Functions in the IO lib. I can't tell you how many, let's say a dozen.

> > (the motivation is systems where Py_ssize_t is 32-bits wide, but large file
> > support makes off_t 64 bits wide)
> 
> For argument parsing, you should use "long long" if SIZEOF_OFF_T is 8
> and long long is supported, and then assign to off_t as appropriate.

It's wrong, because floats would be accepted as argument to the seek() method.
Hence the need for (at least) PyNumber_AsOff_t.
(of course the IO lib can have its own private implementation of
PyNumber_AsOff_t. But then why not make it benefit everyone?)


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