Re: Comparing a CFStringRef with a string literal?
Re: Comparing a CFStringRef with a string literal?
- Subject: Re: Comparing a CFStringRef with a string literal?
- From: Steve Checkoway <email@hidden>
- Date: Sat, 31 Jan 2009 16:06:13 -0800
On Jan 31, 2009, at 2:57 PM, Peter Blazejewicz wrote:
Shouldn't your code be written as (assuming "stringValue" is of
NSString type):
CFStringRef efstr = (CFStringRef)([EFPW stringValue]);
if (efstr== CFSTR("my password")){
}
No. Now you're comparing two pointers for equality and they won't be
equal.
--
Steve Checkoway
"Anyone who says that the solution is to educate the users
hasn't ever met an actual user." -- Bruce Schneier
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden