From: Ronald Oussoren Date: Mon, 30 Mar 2009 19:22:56 +0000 (+0000) Subject: Remove usage of the deprecated '-cString' and '+stringWithCString:' API's X-Git-Tag: v2.7a1~1739 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=451e82439dee0bb9b9408ad39409edf594f0a93b;p=python Remove usage of the deprecated '-cString' and '+stringWithCString:' API's in PythonLauncher, replacing them with the correct counterparts. --- diff --git a/Mac/PythonLauncher/FileSettings.m b/Mac/PythonLauncher/FileSettings.m index 1f3695eec1..66b4fdc086 100755 --- a/Mac/PythonLauncher/FileSettings.m +++ b/Mac/PythonLauncher/FileSettings.m @@ -267,14 +267,14 @@ [script length]-[[script lastPathComponent] length]]; if (honourhashbang && - (fp=fopen([script cString], "r")) && + (fp=fopen([script fileSystemRepresentation], "r")) && fgets(hashbangbuf, sizeof(hashbangbuf), fp) && strncmp(hashbangbuf, "#!", 2) == 0 && (p=strchr(hashbangbuf, '\n'))) { *p = '\0'; p = hashbangbuf + 2; while (*p == ' ') p++; - cur_interp = [NSString stringWithCString: p]; + cur_interp = [NSString stringWithUTF8String: p]; } if (!cur_interp) cur_interp = interpreter;