diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-02-01 20:10:06 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-02-01 20:12:32 -0500 |
commit | d1ac20f7920e788face9c8d32bd554287d7861da (patch) | |
tree | b65f8edae373db749bc4d1275f6cace562cabf7f | |
parent | 2a30f0be17b6244119ef20dcc9bdfabba3c0817f (diff) | |
download | gobject-introspection-d1ac20f7920e788face9c8d32bd554287d7861da.tar.gz |
ast: Allow lookup of the instance parameter by name
This will be used by the doctool to properly identify the
instance parameter.
5 files changed, 9 insertions, 5 deletions
diff --git a/giscanner/ast.py b/giscanner/ast.py index 3092d67a..aae9ee2e 100644 --- a/giscanner/ast.py +++ b/giscanner/ast.py @@ -597,7 +597,7 @@ class Callable(Node): raise ValueError("Unknown argument %s" % (name, )) def get_parameter(self, name): - for parameter in self.parameters: + for parameter in self.all_parameters: if parameter.argname == name: return parameter raise ValueError("Unknown argument %s" % (name, )) diff --git a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page index 54d59f1e..d1be796a 100644 --- a/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page +++ b/tests/doctool/DocExamples-1.0-C-expected/DocExamples.Obj.method.page @@ -53,7 +53,8 @@ gint first_arg, <p>This is an example of how to document a method.</p><p>You should call this on a <link xref="DocExamples.Obj"/> that was -created with <link xref="DocExamples.Obj.new"/>.</p><p>This should be a %FALSEALARM.</p> +created with <link xref="DocExamples.Obj.new"/>, by passing it +in as <code>self</code>.</p><p>This should be a %FALSEALARM.</p> <p>Since 0.99</p> diff --git a/tests/doctool/DocExamples-1.0-Gjs-expected/DocExamples.Obj.method.page b/tests/doctool/DocExamples-1.0-Gjs-expected/DocExamples.Obj.method.page index 7d474ec7..9eae46c1 100644 --- a/tests/doctool/DocExamples-1.0-Gjs-expected/DocExamples.Obj.method.page +++ b/tests/doctool/DocExamples-1.0-Gjs-expected/DocExamples.Obj.method.page @@ -50,7 +50,8 @@ function method(first_arg:Number, second_arg:Number, boolean_arg:Boolean, pointe <p>This is an example of how to document a method.</p><p>You should call this on a <link xref="DocExamples.Obj"/> that was -created with <link xref="DocExamples.Obj.new"/>.</p><p>This should be a %FALSEALARM.</p> +created with <link xref="DocExamples.Obj.new"/>, by passing it +in as <code>self</code>.</p><p>This should be a %FALSEALARM.</p> <p>Since 0.99</p> diff --git a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page index c1900905..050d7b38 100644 --- a/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page +++ b/tests/doctool/DocExamples-1.0-Python-expected/DocExamples.Obj.method.page @@ -51,7 +51,8 @@ def method(self, first_arg, second_arg, boolean_arg, pointer_arg, string): <p>This is an example of how to document a method.</p><p>You should call this on a <link xref="DocExamples.Obj"/> that was -created with <link xref="DocExamples.Obj.new"/>.</p><p>This should be a %FALSEALARM.</p> +created with <link xref="DocExamples.Obj.new"/>, by passing it +in as <code>self</code>.</p><p>This should be a %FALSEALARM.</p> <p>Since 0.99</p> diff --git a/tests/doctool/doc-examples-obj.c b/tests/doctool/doc-examples-obj.c index bd134816..3b571101 100644 --- a/tests/doctool/doc-examples-obj.c +++ b/tests/doctool/doc-examples-obj.c @@ -116,7 +116,8 @@ doc_examples_obj_new (void) * This is an example of how to document a method. * * You should call this on a #DocExamplesObj that was - * created with doc_examples_obj_new(). + * created with doc_examples_obj_new(), by passing it + * in as @self. * * This should be a %FALSEALARM. * |