diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2021-02-28 22:41:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-28 22:41:09 +0000 |
commit | af5fa13ef6f648fc7a7a33a7556db13887e7d643 (patch) | |
tree | faa0ffb9e99a6ae822b9c464a7cb044a8dc8e94f /Python/sysmodule.c | |
parent | e8f5ddd33e44dae4e0121f87a7bf92d754807e49 (diff) | |
download | cpython-git-af5fa13ef6f648fc7a7a33a7556db13887e7d643.tar.gz |
bpo-37146: Deactivate opcode cache only when using huntrleaks in the test suite (GH-24643)
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 13b9034bf7..686b6cae3b 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1958,6 +1958,20 @@ sys_getandroidapilevel_impl(PyObject *module) #endif /* ANDROID_API_LEVEL */ +/*[clinic input] +sys._deactivate_opcache + +Deactivate the opcode cache permanently +[clinic start generated code]*/ + +static PyObject * +sys__deactivate_opcache_impl(PyObject *module) +/*[clinic end generated code: output=00e20982bd012122 input=501eac146735ccf9]*/ +{ + _PyEval_DeactivateOpCache(); + Py_RETURN_NONE; +} + static PyMethodDef sys_methods[] = { /* Might as well keep this in alphabetic order */ @@ -2011,6 +2025,7 @@ static PyMethodDef sys_methods[] = { SYS_GET_ASYNCGEN_HOOKS_METHODDEF SYS_GETANDROIDAPILEVEL_METHODDEF SYS_UNRAISABLEHOOK_METHODDEF + SYS__DEACTIVATE_OPCACHE_METHODDEF {NULL, NULL} /* sentinel */ }; |