Vlad Riscutia <riscutiav...@gmail.com> added the comment:

I wasn't aware this is an auto-generated file. I can add a comment but looking 
at it, it seems we auto-generate this file just to save a call to _dosmaperr. I 
would refactor the whole function to call _dosmaperr first then if result is 
still EINVAL, tweak with custom switch case. The way I see it, this looks like 
premature optimization since OS error shouldn't be on a hot code path, meaning 
an application should be able to live with an extra CRT function call on such 
exceptions. I'm willing to implement this if  there are no objections. 
Something like:

errno = _dosmaperr(err)
if (EINVAL == errno)
{
    switch (err)
    {
    // Our tweaks
    }
}

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12802>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to