]> granicus.if.org Git - python/commitdiff
Issue #28544: Fix inefficient call to _PyObject_CallMethodId()
authorVictor Stinner <victor.stinner@gmail.com>
Sat, 29 Oct 2016 07:05:39 +0000 (09:05 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Sat, 29 Oct 2016 07:05:39 +0000 (09:05 +0200)
"()" format string creates an empty list of argument but requires extra work to
parse the format string.

Modules/_asynciomodule.c

index 6278b2569375da2030572fd54e9ea5faaeb82f5f..18dd37b5a8b9a9c324f3c40975f8607be5185e7a 100644 (file)
@@ -152,7 +152,7 @@ future_init(FutureObj *fut, PyObject *loop)
     Py_CLEAR(fut->fut_loop);
     fut->fut_loop = loop;
 
-    res = _PyObject_CallMethodId(fut->fut_loop, &PyId_get_debug, "()", NULL);
+    res = _PyObject_CallMethodId(fut->fut_loop, &PyId_get_debug, NULL);
     if (res == NULL) {
         return -1;
     }