speed up ==, hash, <, >, <=, and >= for plain_data
[nmutil.git] / src / nmutil / stageapi.py
index 01fc568b0146d2502321441619a667438d1aaa7a..17c4f6509852045a4b812f2121aec6b14ea695ef 100644 (file)
@@ -197,7 +197,8 @@ class StageHelper(Stage):
 
     def setup(self, m, i):
         if self.stage is not None and hasattr(self.stage, "setup"):
-            self.stage.setup(m, i)
+            if self.stage is not self:  # stop infinite recursion
+                self.stage.setup(m, i)
 
     def _postprocess(self, i):  # XXX DISABLED
         return i  # RETURNS INPUT