diff options
author | Torsten Schönfeld <kaffeetisch@gmx.de> | 2011-08-13 12:00:00 +0200 |
---|---|---|
committer | Torsten Schönfeld <kaffeetisch@gmx.de> | 2011-08-13 14:59:24 +0200 |
commit | c47a10f867da52695a5c5b5bf7e0a22dddc0b085 (patch) | |
tree | 21ad6c167d702881598c6edb577f47acfd6d287b /giscanner/ast.py | |
parent | d437ae4ae95bada1305c6b720bb7eb207c7122bf (diff) | |
download | gobject-introspection-c47a10f867da52695a5c5b5bf7e0a22dddc0b085.tar.gz |
scanner: handle static methods on all types
Instead of just handling static methods for classes, handle them for:
- Records and boxed
- Unions
- Interfaces
Based on a patch by Owen Taylor.
https://bugzilla.gnome.org/show_bug.cgi?id=572408
Diffstat (limited to 'giscanner/ast.py')
-rw-r--r-- | giscanner/ast.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/giscanner/ast.py b/giscanner/ast.py index bd56aef3..8ca3a4dd 100644 --- a/giscanner/ast.py +++ b/giscanner/ast.py @@ -19,6 +19,8 @@ # Boston, MA 02111-1307, USA. # +import copy + from .message import Position from .odict import odict from .utils import to_underscores @@ -568,6 +570,13 @@ class Function(Callable): self.shadowed_by = None # C symbol string self.shadows = None # C symbol string + def clone(self): + clone = copy.copy(self) + # copy the parameters array so a change to self.parameters does not + # influence clone.parameters. + clone.parameters = self.parameters[:] + return clone + class ErrorQuarkFunction(Function): |