> 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. I don't think that this would be that useful. What might help is support for parsing arbitrary-sized integers in PyArg_ParseTuple, as this should typically be the path through which you get the valud into the (say) uid variable. However, it's still then fairly tricky: is uid_t a signed type or an unsigned type; if unsigned, can I still have negative values (which, for uid_t, I often can), does the platform have uid_t in the first place, and, if not, what other type should I use? and so on. Regards, Martin
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