From 09bca85dd42deb4d6901ac9926a23f89264b63b6 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Fri, 21 Jan 2011 18:07:45 +0100 Subject: 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 --- giscanner/annotationparser.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'giscanner/annotationparser.py') 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) -- cgit v1.2.1