From: Eric S. Raymond Date: Tue, 3 Oct 2006 09:23:15 +0000 (+0000) Subject: Fix a bug in declratio translation. X-Git-Tag: 1.0~32 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=690806329d0618476357d8e7be31916505339ea0;p=ctopy.git Fix a bug in declratio translation. --- diff --git a/ctopy b/ctopy index 62422e7..c6ee01a 100755 --- a/ctopy +++ b/ctopy @@ -86,9 +86,9 @@ repeat_transformations = ( # Class-Vars between comma and semicolon get a following initializer (r"(\n[ \t]*)(%(class)s)(.*,\s)*(%(id)s)(\s*;)", r"\1\2\3\4 = \2()\5"), # Scalar-vars between commas in a declaration line go away. - (r"(\n[ \t]*(?:%(type)s)\s+.*)(,\s*%(id)s)(,.*);", r"\1\3"), + (r"(\n[ \t]*(?:%(type)s)\s+.*)(,\s*%(id)s)(,.*);", r"\1\3;"), # Bare class-vars between commas get an initializer - (r"(\n[ \t]*)(%(class)s)(\s+.*,)(\s*%(id)s),(.*);", r"\1\2\3\4 = \2(),\5"), + (r"(\n[ \t]*)(%(class)s)(\s+.*,)(\s*%(id)s),(.*);",r"\1\2\3\4 = \2(),\5;"), # Any declaration line not containing an initializer goes away. (r"\n[ \t]*(?:%(type)s|%(class)s)[^=;]*;", ""), ),