[valadoc] doclets/gtkdoc: Replace deprecated function calls



commit 47573c6a8fbf86ddd42fbdbae3bcc9f4b3e5a97f
Author: Florian Brosch <flo brosch gmail com>
Date:   Tue Feb 8 20:03:47 2011 +0100

    doclets/gtkdoc: Replace deprecated function calls

 src/doclets/gtkdoc/utils.vala |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/doclets/gtkdoc/utils.vala b/src/doclets/gtkdoc/utils.vala
index 59e2df8..d95e6cc 100644
--- a/src/doclets/gtkdoc/utils.vala
+++ b/src/doclets/gtkdoc/utils.vala
@@ -27,16 +27,14 @@ using Valadoc.Content;
 
 namespace Gtkdoc {
 	public string get_section (string filename) {
-		long dot = filename.pointer_to_offset (filename.rchr (-1, '.'));
-		return Path.get_basename (filename.substring (0, dot));
+		return Path.get_basename (filename.substring (0, filename.last_index_of_char ('.')));
 	}
 
 	public string commentize (string comment) {
 		return string.joinv ("\n * ", comment.split ("\n"));
 	}
 
-	public string? get_cname (Api.Item item)
-	{
+	public string? get_cname (Api.Item item) {
 		if (item is Api.Method) {
 			return ((Api.Method)item).get_cname ();
 		} else if (item is Api.FormalParameter) {
@@ -184,7 +182,7 @@ namespace Gtkdoc {
 		if (stream != null) {
 			var line = stream.read_line ();
 			if (line != null) {
-				return line.str ("generated by valac") != null;
+				return line.index_of ("generated by valac") >= 0;
 			}
 		}
 		return false;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]