Mercurial > cpython-lru_cache-weakref
diff Mac/PythonLauncher/FileSettings.m @ 52457:14e2750e2506 legacy-trunk
Remove usage of the deprecated '-cString' and '+stringWithCString:' API's
in PythonLauncher, replacing them with the correct counterparts.
| author | Ronald Oussoren <ronaldoussoren@mac.com> |
|---|---|
| date | Mon, 30 Mar 2009 19:22:56 +0000 |
| parents | 20474d9e75e1 |
| children | 5d41ebc79738 |
line wrap: on
line diff
--- a/Mac/PythonLauncher/FileSettings.m Mon Mar 30 19:04:00 2009 +0000 +++ b/Mac/PythonLauncher/FileSettings.m Mon Mar 30 19:22:56 2009 +0000 @@ -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;
