diff options
| author | Paul Pogonyshev <paulp@src.gnome.org> | 2008-12-06 19:31:37 +0000 |
|---|---|---|
| committer | Paul Pogonyshev <paulp@src.gnome.org> | 2008-12-06 19:31:37 +0000 |
| commit | 3a49a1db0e61a31b217ef89119681aa4040e7965 (patch) | |
| tree | 57c9ec7e1ff4eef6d98b476d9a36b1504c06cadc /codegen/h2def.py | |
| parent | 95886775af564a05aaaf5708f0b37279f82d0d76 (diff) | |
Revert 2008-10-31 changes by John Finlay: should only go to 2.17 development.
svn path=/branches/pygobject-2-16/; revision=978
Diffstat (limited to 'codegen/h2def.py')
| -rwxr-xr-x | codegen/h2def.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/codegen/h2def.py b/codegen/h2def.py index 7669fd4..8cbe24e 100755 --- a/codegen/h2def.py +++ b/codegen/h2def.py @@ -174,10 +174,6 @@ def find_enum_defs(buf, enums=[]): # bulk comments buf = strip_comments(buf) - # strip # directives - pat = re.compile(r"""^[#].*?$""", re.MULTILINE) - buf = pat.sub('', buf) - buf = re.sub('\n', ' ', buf) enum_pat = re.compile(r'enum\s*{([^}]*)}\s*([A-Z][A-Za-z]*)(\s|;)') @@ -248,7 +244,6 @@ def clean_func(buf): buf = pat.sub(r'[] \1', buf) # make return types that are const work. - buf = re.sub(r'\s*\*\s*G_CONST_RETURN\s*\*\s*', '** ', buf) buf = string.replace(buf, 'G_CONST_RETURN ', 'const-') buf = string.replace(buf, 'const ', 'const-') @@ -331,8 +326,7 @@ class DefsWriter: for ent in entries: # shorten prefix til we get a match ... # and handle GDK_FONT_FONT, GDK_FONT_FONTSET case - while (prefix[-1] != '_' or ent[:len(prefix)] != prefix - or len(prefix) >= len(ent)): + while ent[:len(prefix)] != prefix or len(prefix) >= len(ent): prefix = prefix[:-1] prefix_len = len(prefix) fp.write(' (values\n') |
