diff options
author | Georg Brandl <georg@python.org> | 2006-05-25 19:15:31 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-05-25 19:15:31 +0000 |
commit | 684fd0c8ec0bad54d3ff39ae15873f80e119478b (patch) | |
tree | 56596aed7bfd401ebe049e566201f75f88150b27 /Python/import.c | |
parent | 3b0cae9cc06374eb7a7159f1328ec700208d6109 (diff) | |
download | cpython-git-684fd0c8ec0bad54d3ff39ae15873f80e119478b.tar.gz |
Replace PyObject_CallFunction calls with only object args
with PyObject_CallFunctionObjArgs, which is 30% faster.
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/import.c b/Python/import.c index 6642082eb5..862f33c703 100644 --- a/Python/import.c +++ b/Python/import.c @@ -1043,7 +1043,7 @@ get_path_importer(PyObject *path_importer_cache, PyObject *path_hooks, PyObject *hook = PyList_GetItem(path_hooks, j); if (hook == NULL) return NULL; - importer = PyObject_CallFunction(hook, "O", p); + importer = PyObject_CallFunctionObjArgs(hook, p, NULL); if (importer != NULL) break; @@ -2499,8 +2499,8 @@ PyImport_Import(PyObject *module_name) goto err; /* Call the _import__ function with the proper argument list */ - r = PyObject_CallFunction(import, "OOOO", - module_name, globals, globals, silly_list); + r = PyObject_CallFunctionObjArgs(import, module_name, globals, + globals, silly_list, NULL); err: Py_XDECREF(globals); |