[vala] Fixed string to char* casts in Scanner and SourceFile



commit dd9803724a0300129016f9b113ac3ecb847ea14b
Author: Didier 'Ptitjes <ptitjes free fr>
Date:   Fri Sep 25 15:47:37 2009 +0200

    Fixed string to char* casts in Scanner and SourceFile

 vala/valascanner.vala    |    2 +-
 vala/valasourcefile.vala |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valascanner.vala b/vala/valascanner.vala
index 628ad52..de90bb5 100644
--- a/vala/valascanner.vala
+++ b/vala/valascanner.vala
@@ -793,7 +793,7 @@ public class Vala.Scanner {
 	}
 
 	static bool matches (char* begin, string keyword) {
-		char* keyword_array = keyword;
+		char* keyword_array = (char*) keyword;
 		long len = keyword.len ();
 		for (int i = 0; i < len; i++) {
 			if (begin[i] != keyword_array[i]) {
diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala
index c857517..ee3d281 100644
--- a/vala/valasourcefile.vala
+++ b/vala/valasourcefile.vala
@@ -291,7 +291,7 @@ public class Vala.SourceFile {
 
 	public char* get_mapped_contents () {
 		if (content != null) {
-			return content;
+			return (char*) content;
 		}
 
 		if (mapped_file == null) {



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