Author hfuru
Recipients giampaolo.rodola, hfuru, terry.reedy
Date 2010-11-15.08:59:22
SpamBayes Score 0.000843044
Marked as misclassified No
Message-id <hbf.20101115sxfh@bombur.uio.no>
In-reply-to <1289590332.36.0.347389142952.issue10350@psf.upfronthosting.co.za>
Content
Terry J. Reedy writes:
> There is one relocation of memory freeing

Modules/timemodule.c does '#if,if(..errno..)' after PyMem_Free(outbuf),
which can overwrite the desired errno.  Instead of reading errno into
a temporary, I moved the free into both branches taken by the #if,if().

> and the additions of
> +        if (res >= 0)
> +            break;
> which I cannot evaluate.

errno is only needed after an error., so I moved 'res < 0' out of the
'while'.
        if (res == MP_EXCEPTION_HAS_BEEN_SET) break;
    } while (res < 0 && errno == EINTR && !PyErr_CheckSignals());
-->
        if (res == MP_EXCEPTION_HAS_BEEN_SET) break;
        if (! (res < 0))                      break;
    } while (errno == EINTR && !PyErr_CheckSignals());
-->
        if (res >= 0)                         break;
        err = errno;
        if (res == MP_EXCEPTION_HAS_BEEN_SET) break;
    } while (err == EINTR && !PyErr_CheckSignals());
History
Date User Action Args
2010-11-15 08:59:24hfurusetrecipients: + hfuru, terry.reedy, giampaolo.rodola
2010-11-15 08:59:22hfurulinkissue10350 messages
2010-11-15 08:59:22hfurucreate