On Thu, May 13, 2010 at 2:11 PM, Luca Bigliardi <[email protected]> wrote: > On Thu, May 13, 2010 at 1:05 PM, Michael Hanselmann <[email protected]> wrote: > >> Well, yes, I can read that, but why? Your comment is almost equivalent >> to commenting “setting A to 123” for “a = 123”. > > Yes, that's why your question looked strange to me :) > >> I don't understand why >> you're setting the errno type, which seems totally unrelated to >> mlockall(). > > What about "preparing errno location so we can check it if mlockall() fails" ? >
How about: # Some older version of the ctypes module don't have built-in functionality to access the errno global variable, where function error codes are stored. By declaring this variable as a pointer to an integer we can then access its value correctly, should the mlockall call fail, in order to see what the actual error code was. Thanks, Guido
