From 46740dc3f31d34db1482e166ad3ce9d30a4ead17 Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Mon, 15 Jun 2009 23:09:09 +0100 Subject: [PATCH] Remove use of deprecated stringWithCString --- PBGitBinary.m | 2 +- gitx.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PBGitBinary.m b/PBGitBinary.m index 49ef7b7..ccb0b0b 100644 --- a/PBGitBinary.m +++ b/PBGitBinary.m @@ -66,7 +66,7 @@ static NSString* gitPath = nil; // Try to find the path of the Git binary char* path = getenv("GIT_PATH"); - if (path && [self acceptBinary:[NSString stringWithCString:path]]) + if (path && [self acceptBinary:[NSString stringWithUTF8String:path]]) return; // No explicit path. Try it with "which" diff --git a/gitx.mm b/gitx.mm index fbd5411..f5f3044 100644 --- a/gitx.mm +++ b/gitx.mm @@ -132,7 +132,7 @@ int main(int argc, const char** argv) NSMutableArray* arguments = [NSMutableArray arrayWithCapacity:argc]; int i = 0; for (i = 0; i < argc; i++) - [arguments addObject: [NSString stringWithCString:argv[i]]]; + [arguments addObject: [NSString stringWithUTF8String:argv[i]]]; if (!isatty(STDIN_FILENO) && fdopen(STDIN_FILENO, "r")) handleSTDINDiff(proxy);