[gobject-introspection] scanner: Only warn about signal parameters if there are some
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] scanner: Only warn about signal parameters if there are some
- Date: Tue, 7 May 2013 22:42:46 +0000 (UTC)
commit 4613390bcfd6a814685a5862925b11338b797e48
Author: Colin Walters <walters verbum org>
Date: Tue May 7 18:41:48 2013 -0400
scanner: Only warn about signal parameters if there are some
We don't want to emit a warning if there are actually no parameters.
giscanner/maintransformer.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 6acc594..11bfb4c 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -797,7 +797,9 @@ class MainTransformer(object):
# phase we can refer to them while resolving annotations.
for i, param in enumerate(signal.parameters):
param.argname, tag = names[i + 1]
- else:
+ elif len(signal.parameters) != 0:
+ # Only warn about missing params if there are actually parameters
+ # besides implicit self.
message.warn("incorrect number of parameters in comment block, "
"parameter annotations will be ignored.", block.position)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]