diff options
author | Jürg Billeter <j@bitron.ch> | 2016-11-01 17:48:15 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2016-11-03 20:47:31 +0100 |
commit | a61dd80e4c4d25fe855692a0ddfded91999789bc (patch) | |
tree | 39b5c2c559f31110704be05e7576d9cfe7370609 /vala/valaparameter.vala | |
parent | 7a5ff26e941f79e85d0bcba37b3c9ec7322e39c5 (diff) | |
download | vala-a61dd80e4c4d25fe855692a0ddfded91999789bc.tar.gz |
Support [FormatArg] attribute for parameters
This attribute specifies that the method takes and returns a printf
or scanf format string without modifying the order or types of expected
arguments, e.g., to translate the format string. This allows the
compiler to check the printf/scanf arguments.
Diffstat (limited to 'vala/valaparameter.vala')
-rw-r--r-- | vala/valaparameter.vala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vala/valaparameter.vala b/vala/valaparameter.vala index 67d172ebc..39820718c 100644 --- a/vala/valaparameter.vala +++ b/vala/valaparameter.vala @@ -44,6 +44,12 @@ public class Vala.Parameter : Variable { public bool captured { get; set; } + public bool format_arg { + get { + return get_attribute ("FormatArg") != null; + } + } + /** * The base parameter of this parameter relative to the base method. */ |