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/085020.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?"Martin v. Löwis" martin at v.loewis.de
Tue Jan 13 20:07:32 CET 2009
> Is it ok to add the following:
>  * a Py_off_t type which is typedef'd to either Py_LONG_LONG (Windows) or off_t
> (others)
>  * three C API functions: PyNumber_AsOff_t, PyLong_AsOff_t, PyLong_FromOff_t
>  * an additional type code for PyArg_ParseTuple and friends; I suggest 'N' since
> 'n' currently means Py_ssize_t, and a Py_off_t should always be at least as wide
> as a Py_ssize_t
> ?

-1. How many functions actually require that type?

> (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.

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