From 866429d0f7df5068f78951e3280fddbfaa7f462a Mon Sep 17 00:00:00 2001 From: Alec Cooper Date: Mon, 25 Jan 2016 11:45:07 -0500 Subject: [PATCH] Removing __swig_getmethods__ for static methods Static methods will always be found by normal attribute lookup, so there's no need to check for them during __getattr__ (aka _swig_getattr_nondynamic) --- Source/Modules/python.cxx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index 1c8169a36..56f4c321e 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -4727,16 +4727,7 @@ public: Printv(f_shadow, tab8, "return ", funcCall(Swig_name_member(NSPACE_TODO, class_name, symname), callParms), "\n\n", NIL); } Printv(f_shadow, tab4, symname, " = staticmethod(", symname, ")\n", NIL); - - if (!modern) { - Printv(f_shadow, tab4, "__swig_getmethods__[\"", symname, "\"] = lambda x: ", symname, "\n", NIL); - } - } else { - if (!modern) { - Printv(f_shadow, tab4, "__swig_getmethods__[\"", symname, "\"] = lambda x: ", module, ".", Swig_name_member(NSPACE_TODO, class_name, symname), "\n", - NIL); - } if (!classic) { if (!modern) Printv(f_shadow, tab4, "if _newclass:\n", tab4, NIL);