• 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
problem with [NSData bytes] on Intel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with [NSData bytes] on Intel


  • Subject: problem with [NSData bytes] on Intel
  • From: john <email@hidden>
  • Date: Sat, 4 Feb 2006 02:18:05 -0500

Hi,

I'm having an unusual problem when I gain access to the bytes of an NSData on an Intel iMac. Everything works fine on PPC and Rosetta, but the native Intel binary exhibits this problem.

If I create a local variable of type float* and use it to reference an NSData's bytes via (float*)[NSData bytes], when I loop through this variable all the values are 0.

However, if I write that same NSData to a text file it contains the correct information. Further, if I create a new NSData using dataWithBytes:length: with my local variable (that apparently points to all 0's) and write that to a text file it is also correct.

Am I missing something?

-- John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: problem with [NSData bytes] on Intel
      • From: Markus Hitter <email@hidden>
    • Re: problem with [NSData bytes] on Intel
      • From: John Stiles <email@hidden>
  • Prev by Date: Re: Unix program wrapper problem
  • Next by Date: Re: problem with [NSData bytes] on Intel
  • Previous by thread: Re: replacing control characters in a NSMutableString
  • Next by thread: Re: problem with [NSData bytes] on Intel
  • Index(es):
    • Date
    • Thread