Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

> AFAIU, set_errno/get_errno should provide a ctypes-private copy of the real 
> errno.
> The copy is copied into the 'real' errno just before ffi_call (in 
> Modules/_ctypes/callproc.c),
> and the real errno is copied in to ctypes copy right after the call.

If you clear errno, anyway, you can also drop the set_errno call, and
zero-initialize errno before each call. The point of set_errno would
be that you have the choice of *not* calling it, i.e. passing into
the function the errno value that was there before you made the API
call. If you fill something else into errno always, the application has
no way of not modifying errno before the API call.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1798>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to