Author loewis
Recipients amaury.forgeotdarc, arigo, fijal, loewis, theller
Date 2008-05-23.17:31:09
SpamBayes Score 0.00507575
Marked as misclassified No
Message-id <4836FF58.7080609@v.loewis.de>
In-reply-to <4836E4BD.6070306@ctypes.org>
Content
>> How can Python run arbitrary code between the return from a ctypes
>> method and the next Python instruction? None of the code should have any
>> effect on errno.
> 
> By freeing objects because their refcount has reached zero?

No, that should not set errno. Free cannot fail, and will not modify
errno. Try running

#include <errno.h>
int main()
{
    errno = 117;
    free(malloc(100));
    printf("%d\n", errno);
}

malloc might set errno, but only if it fails (in which case you'll get
a Python exception, anyway).
History
Date User Action Args
2008-05-23 17:31:12loewissetspambayes_score: 0.00507575 -> 0.00507575
recipients: + loewis, arigo, theller, amaury.forgeotdarc, fijal
2008-05-23 17:31:10loewislinkissue1798 messages
2008-05-23 17:31:09loewiscreate