First of all, I'm not subbscribed to the list (too much traffic for me), so please CC: me in any answers if possible.
I'm trying to add a new syscall to the os module: https://bugs.python.org/issue26826 One of the few missing parts is to cenvert a parameter, which would be a Python int object using PyArg_ParseTupleAndKeywords() to a size_t variable. For something similar, the 'n' format exists, but that one converts to Py_ssize_t (which is ssize_t, really), but that one is signed. One possible solution hat was suggested to me in the #python IRC channel was to use that, then test if the resulting value is negative, and adjust accordingly, but I wonder if there is a cleaner, more general solution (for instance, what if the type was something else, like loff_t, although for that one in particular there *is* a convertion function/macro). -- (Not so) Random fortune: Premature optimization is the root of all evil. -- Donald Knuth _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com