• 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
A Short DO Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A Short DO Problem


  • Subject: A Short DO Problem
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sun, 11 Aug 2002 19:01:36 +0200

Main Thread does:

SomeObject *aProxy = [ calculator computorGiveDummy ] ;
// calculator is Proxy of some calculator object, running in another thread

NSMethodSignature *sig = [ aProxy methodSignatureForSelector: @selector(giveMeUnsignedShort) ];
unsigned lengt = [ sig methodReturnLength ];
const char *typ = [ sig methodReturnType ];
unsigned short data = [ aProxy giveMeUnsignedShort ] ;

the result is :
length = 2 byte, typ = S and (without optimisation, i.e. -O0) data = 0xaa20.

But with optimisation (no -O flag) I get data = 0xffffaa20.

What am I doing wrong? What can I doto make it work ?

Gerriet.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • NSToolbarItem actions and modifier keys
      • From: Paul Ferguson <email@hidden>
  • Prev by Date: Run tab in ProjectBuilder
  • Next by Date: Re: Where to pu setIndicatorImage: ?
  • Previous by thread: Run tab in ProjectBuilder
  • Next by thread: NSToolbarItem actions and modifier keys
  • Index(es):
    • Date
    • Thread