summaryrefslogtreecommitdiff
path: root/Source/Modules/python.cxx
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2022-04-07 12:05:54 +1200
committerOlly Betts <olly@survex.com>2022-04-07 12:05:54 +1200
commit1aeaa2a64424e5ffa3797063e23591854a7a5399 (patch)
treea4b23152cb3f4f212d6509090529ae1034c25b1c /Source/Modules/python.cxx
parent779d5cf57ade9de944d8feece9f5101668e2245f (diff)
downloadswig-1aeaa2a64424e5ffa3797063e23591854a7a5399.tar.gz
Recognise and ignore Doxygen group commands @{ and @}
Fixes #1750
Diffstat (limited to 'Source/Modules/python.cxx')
-rw-r--r--Source/Modules/python.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
index c97bc4610..cd87984dc 100644
--- a/Source/Modules/python.cxx
+++ b/Source/Modules/python.cxx
@@ -5053,8 +5053,11 @@ public:
Printv(f_shadow, tab4, symname, variable_annotation, " = property(", module, ".", getname, NIL);
if (assignable)
Printv(f_shadow, ", ", module, ".", setname, NIL);
- if (have_docstring(n))
- Printv(f_shadow, ", doc=", docstring(n, AUTODOC_VAR, tab4), NIL);
+ if (have_docstring(n)) {
+ String *s = docstring(n, AUTODOC_VAR, tab4);
+ if (Len(s))
+ Printv(f_shadow, ", doc=", s, NIL);
+ }
Printv(f_shadow, ")\n", NIL);
Delete(variable_annotation);
Delete(mname);
@@ -5121,8 +5124,11 @@ public:
Printv(f_shadow, tab4, symname, " = property(", module, ".", getname, NIL);
if (assignable)
Printv(f_shadow, ", ", module, ".", setname, NIL);
- if (have_docstring(n))
- Printv(f_shadow, ", doc=", docstring(n, AUTODOC_VAR, tab4), NIL);
+ if (have_docstring(n)) {
+ String *s = docstring(n, AUTODOC_VAR, tab4);
+ if (Len(s))
+ Printv(f_shadow, ", doc=", s, NIL);
+ }
Printv(f_shadow, ")\n", NIL);
}
String *getter = Getattr(n, "pybuiltin:getter");