mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
Merged revisions 70735 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r70735 | ronald.oussoren | 2009-03-30 14:22:56 -0500 (Mon, 30 Mar 2009) | 3 lines Remove usage of the deprecated '-cString' and '+stringWithCString:' API's in PythonLauncher, replacing them with the correct counterparts. ........
This commit is contained in:
parent
e391835f35
commit
4a85269f73
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue