From: Rico Tzschichholz Date: Wed, 10 Apr 2019 07:23:54 +0000 (+0200) Subject: vala: Add SourceLocation.to_string() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f512d7aa2a0f79d51ad0cd91e6b2a013077c5740;p=thirdparty%2Fvala.git vala: Add SourceLocation.to_string() --- diff --git a/vala/valasourcelocation.vala b/vala/valasourcelocation.vala index 374a6837f..f99361d85 100644 --- a/vala/valasourcelocation.vala +++ b/vala/valasourcelocation.vala @@ -35,5 +35,14 @@ public struct Vala.SourceLocation { line = _line; column = _column; } + + /** + * Returns a string representation of this source location. + * + * @return human-readable string + */ + public string to_string () { + return ("%d.%d".printf (line, column)); + } }