Skip to content

Commit 46740dc

Browse files
author
Pieter de Bie
committed
Remove use of deprecated stringWithCString
1 parent 5f97caa commit 46740dc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

PBGitBinary.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ + (void) initialize
6666

6767
// Try to find the path of the Git binary
6868
char* path = getenv("GIT_PATH");
69-
if (path && [self acceptBinary:[NSString stringWithCString:path]])
69+
if (path && [self acceptBinary:[NSString stringWithUTF8String:path]])
7070
return;
7171

7272
// No explicit path. Try it with "which"

gitx.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ int main(int argc, const char** argv)
132132
NSMutableArray* arguments = [NSMutableArray arrayWithCapacity:argc];
133133
int i = 0;
134134
for (i = 0; i < argc; i++)
135-
[arguments addObject: [NSString stringWithCString:argv[i]]];
135+
[arguments addObject: [NSString stringWithUTF8String:argv[i]]];
136136

137137
if (!isatty(STDIN_FILENO) && fdopen(STDIN_FILENO, "r"))
138138
handleSTDINDiff(proxy);

0 commit comments

Comments
 (0)