Kaydet (Commit) 451e8243 authored tarafından Ronald Oussoren's avatar Ronald Oussoren

Remove usage of the deprecated '-cString' and '+stringWithCString:' API's

in PythonLauncher, replacing them with the correct counterparts.
üst 59beec32
...@@ -267,14 +267,14 @@ ...@@ -267,14 +267,14 @@
[script length]-[[script lastPathComponent] length]]; [script length]-[[script lastPathComponent] length]];
if (honourhashbang && if (honourhashbang &&
(fp=fopen([script cString], "r")) && (fp=fopen([script fileSystemRepresentation], "r")) &&
fgets(hashbangbuf, sizeof(hashbangbuf), fp) && fgets(hashbangbuf, sizeof(hashbangbuf), fp) &&
strncmp(hashbangbuf, "#!", 2) == 0 && strncmp(hashbangbuf, "#!", 2) == 0 &&
(p=strchr(hashbangbuf, '\n'))) { (p=strchr(hashbangbuf, '\n'))) {
*p = '\0'; *p = '\0';
p = hashbangbuf + 2; p = hashbangbuf + 2;
while (*p == ' ') p++; while (*p == ' ') p++;
cur_interp = [NSString stringWithCString: p]; cur_interp = [NSString stringWithUTF8String: p];
} }
if (!cur_interp) if (!cur_interp)
cur_interp = interpreter; cur_interp = interpreter;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment