• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CFDictionary callback on PPC vs Intel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: CFDictionary callback on PPC vs Intel
      • From: "Derrek Leute" <email@hidden>
References: 
 >CFDictionary callback on PPC vs Intel (From: "Derrek Leute" <email@hidden>)

  • Prev by Date: CFDictionary callback on PPC vs Intel
  • Next by Date: Re: Help with displaying encrypted PDF image
  • Previous by thread: CFDictionary callback on PPC vs Intel
  • Next by thread: Re: CFDictionary callback on PPC vs Intel
  • Index(es):
    • Date
    • Thread