summaryrefslogtreecommitdiff
path: root/giscanner/annotationparser.py
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2011-01-21 18:07:45 +0100
committerTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2011-02-02 16:15:35 +0100
commit09bca85dd42deb4d6901ac9926a23f89264b63b6 (patch)
treecdb3ab88bce0a7df81e725464fe9b83db2af8fad /giscanner/annotationparser.py
parent2cdf794544e4151e4039fe93b13d3e842458ab4f (diff)
downloadgobject-introspection-09bca85dd42deb4d6901ac9926a23f89264b63b6.tar.gz
Add (method) overrides
So methods such as gtk_drag_dest_set() can be put inside Gtk.Widget https://bugzilla.gnome.org/show_bug.cgi?id=639945
Diffstat (limited to 'giscanner/annotationparser.py')
-rw-r--r--giscanner/annotationparser.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index f267d84d..2a22ece3 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -55,6 +55,7 @@ OPT_TRANSFER = 'transfer'
OPT_TYPE = 'type'
OPT_SKIP = 'skip'
OPT_CONSTRUCTOR = 'constructor'
+OPT_METHOD = 'method'
ALL_OPTIONS = [
OPT_ALLOW_NONE,
@@ -72,7 +73,8 @@ ALL_OPTIONS = [
OPT_TRANSFER,
OPT_TYPE,
OPT_SKIP,
- OPT_CONSTRUCTOR]
+ OPT_CONSTRUCTOR,
+ OPT_METHOD]
# Array options - array specific annotations
OPT_ARRAY_FIXED_SIZE = 'fixed-size'
@@ -333,6 +335,8 @@ class DocTag(object):
n_params=1)
elif option == OPT_CONSTRUCTOR:
self._validate_option('constructor', value, n_params=0)
+ elif option == OPT_METHOD:
+ self._validate_option('method', value, n_params=0)
else:
message.warn('invalid annotation option: %s' % (option, ),
self.position)