[Python-Dev] Add Py_off_t and related APIs?

Daniel Stutzbach daniel at stutzbachenterprises.com
Tue Jan 13 23:42:55 CET 2009


On Tue, Jan 13, 2009 at 2:33 PM, "Martin v. Löwis" <martin at v.loewis.de>wrote:

> If we start with that, we end up with ParseTuple formats for
> uid_t, gid_t, pid_t, and the other dozen integral types that
> POSIX has invented.
>

Perhaps it would be useful to provide generic support for integer types that
might have different widths on different platforms?  e.g.:

uid_t uid = PyNumber_AS_INT_BY_SIZE(number_ob, uid_t);

That way, the core does not need to know about every blah_t type used by
POSIX and extension modules, while offering convenient conversion functions
nonetheless.

--
Daniel Stutzbach, Ph.D.
President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20090113/1cc2a786/attachment-0001.htm>


More information about the Python-Dev mailing list