diff options
author | Colin Walters <walters@verbum.org> | 2011-06-03 17:32:15 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2011-06-03 17:33:16 -0400 |
commit | 6e1158f62b0b2f50603d018ebeff6d2c75dd5f98 (patch) | |
tree | 8b19f0cdeb2f56018c58faf30ef92500938f05e1 /giscanner/maintransformer.py | |
parent | 113656896ae85391d0ee52261451361363439474 (diff) | |
download | gobject-introspection-6e1158f62b0b2f50603d018ebeff6d2c75dd5f98.tar.gz |
scanner: Support _get_gtype() as a GType creation suffix
Based on a patch by Giovanni Campagna <gcampagna@src.gnome.org>
https://bugzilla.gnome.org/show_bug.cgi?id=646635
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r-- | giscanner/maintransformer.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py index bc795c08..dd20af1e 100644 --- a/giscanner/maintransformer.py +++ b/giscanner/maintransformer.py @@ -900,7 +900,9 @@ _split_uscored_by_type(text_buffer_try_new) -> (ast.Class(TextBuffer), 'try_new' def _pair_function(self, func): """Check to see whether a toplevel function should be a method or constructor of some type.""" - if func.symbol.endswith('_get_type') or func.symbol.startswith('_'): + if (func.symbol.endswith('_get_type') + or func.symbol.endswith('_get_gtype') + or func.symbol.startswith('_')): return (ns, subsymbol) = self._transformer.split_csymbol(func.symbol) assert ns == self._namespace |