Message67760
>> (Another note: the C-level errno and the TLS copy should also be
>> synchronized when the C code invokes a Python callback.)
>
> What I meant is what should occur when a pure Python function is used
> as a callback. At this point there is already some logic e.g. to
> re-acquire the GIL if necessary. Maybe it needs to grow logic to
> optionally copy the C-level errno into the TLS variable at the start,
> and at the end copy it back into the C-level errno at the end, for the
> cases where the C code expects the callback to be able to set errno.
I figured that out in the meantime and implemented it in this way.
See the code around line 295 in Modules/_ctypes/callbacks.c. |
|
| Date |
User |
Action |
Args |
| 2008-06-06 11:14:01 | theller | set | spambayes_score: 0.103862 -> 0.103862 recipients:
+ theller, loewis, arigo, amaury.forgeotdarc, fijal |
| 2008-06-06 11:14:00 | theller | link | issue1798 messages |
| 2008-06-06 11:14:00 | theller | create | |
|