Re: CFDictionary callback on PPC vs Intel
Re: CFDictionary callback on PPC vs Intel
- Subject: Re: CFDictionary callback on PPC vs Intel
- From: "Michael Ash" <email@hidden>
- Date: Sun, 17 Feb 2008 11:07:42 -0500
On Feb 17, 2008 10:51 AM, Derrek Leute <email@hidden> wrote:
> int im = atoi(m);
You declare im as an int.
> CFNumberRef nmref = CFMakeCollectable(CFNumberCreate(NULL,
> kCFNumberSInt16Type, &im));
But tell CFNumber it's a signed short. The only reason it ever worked
is by luck. Don't do that.
Since this is cocoa-dev, may I suggest using Cocoa instead of CF? As
far as I can see you aren't taking advantage of anything CF offers
above what Cocoa offers, and Cocoa is nicer-looking and will
incidentally avoid this error since NSNumber takes parameters by value
instead of by reference.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden