summaryrefslogtreecommitdiffstats
path: root/Tests/SwiftMix/SwiftMain.swift
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2015-09-03 13:26:06 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2015-09-03 18:30:32 (GMT)
commit874a265c94ff17e07a96969c0a7f8f98a66b1074 (patch)
treefaaa4f93c1c2644ba8524f9939d303ffefeb2806 /Tests/SwiftMix/SwiftMain.swift
parente7777cc5635e95d3b36aaf4e9a528c92534aca30 (diff)
downloadCMake-874a265c94ff17e07a96969c0a7f8f98a66b1074.zip
CMake-874a265c94ff17e07a96969c0a7f8f98a66b1074.tar.gz
CMake-874a265c94ff17e07a96969c0a7f8f98a66b1074.tar.bz2
Swift: Make SwiftMix compatible with Swift 2
Diffstat (limited to 'Tests/SwiftMix/SwiftMain.swift')
-rw-r--r--Tests/SwiftMix/SwiftMain.swift6
1 files changed, 4 insertions, 2 deletions
diff --git a/Tests/SwiftMix/SwiftMain.swift b/Tests/SwiftMix/SwiftMain.swift
index 7e7c4ab..3629ac8 100644
--- a/Tests/SwiftMix/SwiftMain.swift
+++ b/Tests/SwiftMix/SwiftMain.swift
@@ -1,8 +1,10 @@
-@objc class SwiftMainClass {
+import Foundation
+
+@objc class SwiftMainClass : NSObject {
class func SwiftMain(argc:Int, argv:UnsafePointer<UnsafePointer<CChar>>) -> Int32 {
dump("argc: \(argc)")
for (var i = 0; i < argc; ++i) {
- var argi = String.fromCString(argv[i])
+ let argi = String.fromCString(argv[i])
dump("arg[\(i)]: \(argi)");
}
return 0;