]> granicus.if.org Git - python/commitdiff
bpo-32357: Use PySet_GET_SIZE macro in _is_coroutine() from _asynciomodule.c (#4990)
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Sat, 23 Dec 2017 20:06:46 +0000 (22:06 +0200)
committerYury Selivanov <yury@magic.io>
Sat, 23 Dec 2017 20:06:46 +0000 (15:06 -0500)
Modules/_asynciomodule.c

index 25acd552b186222ad2169dfd5e183b60b803e807..d626127699a2b5da100cf1f807901127632ab3f9 100644 (file)
@@ -138,7 +138,7 @@ _is_coroutine(PyObject *coro)
         return is_res_true;
     }
 
-    if (PySet_Size(iscoroutine_typecache) < 100) {
+    if (PySet_GET_SIZE(iscoroutine_typecache) < 100) {
         /* Just in case we don't want to cache more than 100
            positive types.  That shouldn't ever happen, unless
            someone stressing the system on purpose.