]> granicus.if.org Git - python/commitdiff
Merged revisions 70735 via svnmerge from
authorRonald Oussoren <ronaldoussoren@mac.com>
Mon, 30 Mar 2009 19:25:21 +0000 (19:25 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Mon, 30 Mar 2009 19:25:21 +0000 (19:25 +0000)
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.
........

Mac/PythonLauncher/FileSettings.m

index 1f3695eec17135acd22be2647717ddda4813c250..66b4fdc0866355d42d2b46ca181472ffcb19f704 100755 (executable)
            [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;