This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients arigo, nadeem.vawda, ncoghlan
Date 2011-08-29.11:43:28
SpamBayes Score 0.00022640337
Marked as misclassified No
Message-id <1314618209.16.0.460315141118.issue12850@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-08-29 11:43:29ncoghlansetrecipients: + ncoghlan, arigo, nadeem.vawda
2011-08-29 11:43:29ncoghlansetmessageid: <1314618209.16.0.460315141118.issue12850@psf.upfronthosting.co.za>
2011-08-29 11:43:28ncoghlanlinkissue12850 messages
2011-08-29 11:43:28ncoghlancreate