Message143136
Rather than exposing the function pointers directly to the linker, I'd be happier with a function based API, with the pointer storage then being made static inside ceval.c.
/* Each function returns the old func, or NULL on failure */
_PyEval_GIL_func _PyEval_replace_take_GIL(_PyEval_GIL_func take_gil); _PyEval_GIL_func _PyEval_replace_drop_GIL(_PyEval_GIL_func drop_gil);
The redirection code (sans error checking) would then look like:
old_take_gil = _PyEval_replace_take_GIL(stm_take_gil);
old_drop_gil = _PyEval_replace_drop_GIL(stm_drop_gil);
Currently they'd just replace the statics and would never fail, but it provides looser coupling regardless. |
|
Date |
User |
Action |
Args |
2011-08-29 11:43:29 | ncoghlan | set | recipients:
+ ncoghlan, arigo, nadeem.vawda |
2011-08-29 11:43:29 | ncoghlan | set | messageid: <1314618209.16.0.460315141118.issue12850@psf.upfronthosting.co.za> |
2011-08-29 11:43:28 | ncoghlan | link | issue12850 messages |
2011-08-29 11:43:28 | ncoghlan | create | |
|