[Python-checkins] r70735 - python/trunk/Mac/PythonLauncher/FileSettings.m

ronald.oussoren python-checkins at python.org
Mon Mar 30 21:22:56 CEST 2009


Author: ronald.oussoren
Date: Mon Mar 30 21:22:56 2009
New Revision: 70735

Log:
Remove usage of the deprecated '-cString' and '+stringWithCString:' API's
in PythonLauncher, replacing them with the correct counterparts.


Modified:
   python/trunk/Mac/PythonLauncher/FileSettings.m

Modified: python/trunk/Mac/PythonLauncher/FileSettings.m
==============================================================================
--- python/trunk/Mac/PythonLauncher/FileSettings.m	(original)
+++ python/trunk/Mac/PythonLauncher/FileSettings.m	Mon Mar 30 21:22:56 2009
@@ -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;


More information about the Python-checkins mailing list