[gobject-introspection] [maintransformer] Do not warn for vararg docs
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] [maintransformer] Do not warn for vararg docs
- Date: Thu, 16 Sep 2010 13:28:53 +0000 (UTC)
commit 9032f355c1043c5e1c06804e2872718e756c90b1
Author: Johan Dahlin <johan gnome org>
Date: Thu Sep 16 10:27:35 2010 -0300
[maintransformer] Do not warn for vararg docs
Allow varargs "..." to be documented without warning
https://bugzilla.gnome.org/show_bug.cgi?id=629759
giscanner/maintransformer.py | 3 +++
tests/warn/unknown-parameter.h | 10 ++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 67f6391..f2527b5 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -588,6 +588,9 @@ usage is void (*_gtk_reserved1)(void);"""
for doc_name in docparams:
if doc_name in allparams:
continue
+ # Skip varargs, see #629759
+ if doc_name == '...':
+ continue
if len(allparams) == 0:
text = ''
elif len(allparams) == 1:
diff --git a/tests/warn/unknown-parameter.h b/tests/warn/unknown-parameter.h
index 5b43c75..d1fc776 100644
--- a/tests/warn/unknown-parameter.h
+++ b/tests/warn/unknown-parameter.h
@@ -26,3 +26,13 @@ void test_param_mismatch2(int a, int *out2);
void test_param_missing(void);
// EXPECT:: Warning: Test: test_param_missing: unknown parameter 'missing' in documentation comment
+
+
+/**
+ * test_param_vargs:
+ * @...: The varargs
+ *
+ */
+void test_param_varargs(int i, ...);
+
+// Should not warn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]