• 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: looks like Intel vs. PowerPC difference
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: looks like Intel vs. PowerPC difference


  • Subject: Re: looks like Intel vs. PowerPC difference
  • From: "Shawn Erickson" <email@hidden>
  • Date: Thu, 3 Aug 2006 11:11:28 -0700

On 8/3/06, Andrei Tchijov <email@hidden> wrote:
It looks like

+[ NSStream (void)getStreamsToHost:(NSHost *)host port:(int)port
inputStream:(NSInputStream **)inputStream outputStream:
(NSOutputStream **)outputStream ]

works slightly different on Intel, compare to PowerPC.  On PowerPC,
when this method fails, it will set inputStream/outputStream to nil.
It looks like on Intel, in case of failure, it leaves inputStream/
outputStream untouched.

Does it sound right, or am I hallucinating?

The docs don't state what will happen to inputStream and outputStream in the event of a failure (to bad it isn't stated). So you can't safely depend on what the implementation will do since it isn't specified. In a situation like that I would initialize them to nil before sending that message.

Additionally I would query the status of the returned stream to
validate the state is as you expect (see -[NSStream streamStatus]).

-Shawn
_______________________________________________
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


References: 
 >looks like Intel vs. PowerPC difference (From: Andrei Tchijov <email@hidden>)

  • Prev by Date: Re: Pull-down NSPopUpButton with checked item?
  • Next by Date: Customizing Save panel
  • Previous by thread: Re: looks like Intel vs. PowerPC difference
  • Next by thread: Re: looks like Intel vs. PowerPC difference
  • Index(es):
    • Date
    • Thread