]> granicus.if.org Git - python/commitdiff
Remove usage of the deprecated '-cString' and '+stringWithCString:' API's
authorRonald Oussoren <ronaldoussoren@mac.com>
Mon, 30 Mar 2009 19:22:56 +0000 (19:22 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Mon, 30 Mar 2009 19:22:56 +0000 (19:22 +0000)
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;