Re: [Python-Dev] Convert int() to size_t in Python/C

2016-04-29 Thread Martin Panter
On 29 April 2016 at 18:11, Marcos Dione wrote: > On Fri, Apr 29, 2016 at 12:18:46PM -0400, Random832 wrote: >> On Fri, Apr 29, 2016, at 10:45, Marcos Dione wrote: >> > One possible solution hat was suggested to me in the #python IRC >> > channel was to use that, then

Re: [Python-Dev] Convert int() to size_t in Python/C

2016-04-29 Thread Martin Panter
On 29 April 2016 at 18:25, Random832 wrote: > On Fri, Apr 29, 2016, at 14:11, Marcos Dione wrote: >> These are not output parameters, even if they're pointers. they'r >> using the NULL pointer to signal that the current offsets should not be >> touched, to

Re: [Python-Dev] Convert int() to size_t in Python/C

2016-04-29 Thread Random832
On Fri, Apr 29, 2016, at 14:11, Marcos Dione wrote: > These are not output parameters, even if they're pointers. they'r > using the NULL pointer to signal that the current offsets should not be > touched, to differentiate from a offset of 0. Something that in Python we > would use None.

Re: [Python-Dev] Convert int() to size_t in Python/C

2016-04-29 Thread Marcos Dione
On Fri, Apr 29, 2016 at 12:18:46PM -0400, Random832 wrote: > On Fri, Apr 29, 2016, at 10:45, Marcos Dione wrote: > > 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

Re: [Python-Dev] Convert int() to size_t in Python/C

2016-04-29 Thread Terry Reedy
On 4/29/2016 10:45 AM, Marcos Dione wrote: 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 am indulging you this once, but the proper solution is to read pydev via the gmane.comp.python.devel mirror at

Re: [Python-Dev] Convert int() to size_t in Python/C

2016-04-29 Thread Random832
On Fri, Apr 29, 2016, at 10:45, Marcos Dione wrote: > 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,

[Python-Dev] Convert int() to size_t in Python/C

2016-04-29 Thread Marcos Dione
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