summaryrefslogtreecommitdiff
path: root/tools/pm/Property.pm
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2012-02-24 13:31:43 +0100
committerMurray Cumming <murrayc@murrayc.com>2012-02-24 13:31:43 +0100
commit9b9e3192d60e28b39f90c59b1c8ca5c98262e6ac (patch)
tree0f24b6f4a489e259fae5ad19983ea718b533e3f0 /tools/pm/Property.pm
parent7359374ab9fae0921a3ef0b5a1f35ca018e603e4 (diff)
downloadglibmm-9b9e3192d60e28b39f90c59b1c8ca5c98262e6ac.tar.gz
gmmproc: _WRAP_PROPERTY(): Allow properties to be deprecated.
* tools/m4/property.m4: get_docs(): Take optional documentation_docs too, like DocsParser::lookup_documentation(). * tools/pm/Output.pm: output_wrap_property(): Take a deprecated bool and deprecated_docs, adding the ifdef if necessary and passing it to the _PROPERTY_PROXY() m4 macro, with the amended documentation. * tools/pm/Property.pm: _PROPERTY_PROXY(): Take a deprecated bool parameter and add the ifndef if necessary. * tools/pm/WrapParser.pm: on_wrap_property(): Parse an optional deprecated "the explanation" parameter.
Diffstat (limited to 'tools/pm/Property.pm')
-rw-r--r--tools/pm/Property.pm14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/pm/Property.pm b/tools/pm/Property.pm
index a0e97596..03d67b46 100644
--- a/tools/pm/Property.pm
+++ b/tools/pm/Property.pm
@@ -110,10 +110,18 @@ sub get_writable($)
return $$self{writable};
}
-sub get_docs($)
+sub get_docs($$)
{
- my ($self) = @_;
- return $$self{docs};
+ my ($self, $deprecation_docs) = @_;
+ my $text = $$self{docs};
+
+ #Add note about deprecation if we have specified that in our _WRAP_METHOD() call:
+ if($deprecation_docs ne "")
+ {
+ $text .= "\n * \@deprecated $deprecation_docs";
+ }
+
+ return $text;
}