delete blank lines from memoryview utility code
authorStefan Behnel <stefan_ml@behnel.de>
Tue, 21 Aug 2012 19:41:32 +0000 (21:41 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Tue, 21 Aug 2012 19:41:32 +0000 (21:41 +0200)
Cython/Compiler/Code.py

index 91ebe61..6a55b4c 100644 (file)
@@ -269,9 +269,10 @@ class UtilityCodeBase(object):
         """
         util = cls.load(util_code_name, from_file, **kwargs)
         proto, impl = util.proto, util.impl
-        return proto and proto.lstrip(), impl and impl.lstrip()
+        return cls.format_code(proto), cls.format_code(impl)
 
-    def format_code(self, code_string, replace_empty_lines=re.compile(r'\n\n+').sub):
+    @staticmethod
+    def format_code(code_string, replace_empty_lines=re.compile(r'\n\n+').sub):
         """
         Format a code section for output.
         """