summaryrefslogtreecommitdiffstats
path: root/Modules/_interpchannelsmodule.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2025-05-30 18:28:35 (GMT)
committerGitHub <noreply@github.com>2025-05-30 18:28:35 (GMT)
commitd45d05326745fd6722d7af639eed7c1f408da426 (patch)
treea0f5f3d1fda1013601b2421cc24dca0d1b6b7cb9 /Modules/_interpchannelsmodule.c
parent69536093de97b52789912bf1260b395a38b42aa8 (diff)
downloadcpython-d45d05326745fd6722d7af639eed7c1f408da426.zip
cpython-d45d05326745fd6722d7af639eed7c1f408da426.tar.gz
cpython-d45d05326745fd6722d7af639eed7c1f408da426.tar.bz2
[3.14] gh-132775: Expand the Capability of Interpreter.call() (gh-134933)
It now supports most callables, full args, and return values. (cherry picked from commit 52deabe, AKA gh-133484) Co-authored-by: Eric Snow ericsnowcurrently@gmail.com
Diffstat (limited to 'Modules/_interpchannelsmodule.c')
-rw-r--r--Modules/_interpchannelsmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_interpchannelsmodule.c b/Modules/_interpchannelsmodule.c
index bfd805b..ea2e5f9 100644
--- a/Modules/_interpchannelsmodule.c
+++ b/Modules/_interpchannelsmodule.c
@@ -254,10 +254,10 @@ _get_current_module_state(void)
{
PyObject *mod = _get_current_module();
if (mod == NULL) {
- // XXX import it?
- PyErr_SetString(PyExc_RuntimeError,
- MODULE_NAME_STR " module not imported yet");
- return NULL;
+ mod = PyImport_ImportModule(MODULE_NAME_STR);
+ if (mod == NULL) {
+ return NULL;
+ }
}
module_state *state = get_module_state(mod);
Py_DECREF(mod);