• 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
Help with an old problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with an old problem


  • Subject: Help with an old problem
  • From: "Tim Hart" <email@hidden>
  • Date: Wed, 17 May 2006 12:11:58 -0500

List,



This is a new problem (for me) on an old, unsupported platform
(WebObjects/YellowBox 4.5.1). I'm hoping someone has seen this before.



It seems that -[NSObject methodSignatureForSelector:] blows up if the method
signature's return type is a struct (or pointer to struct) that contains a
pointer to a struct. GDB reports the call stack as so:



#0  0x32044038 in hashStr ()

#1  0x3201b147 in NSMapGet ()

#2  0x3204424d in +[NSMethodSignature signatureWithObjCTypes:] ()

#3  0x320455b9 in -[NSObject methodSignatureForSelector:] ()



Code (typed in mail, usual disclaimers apply):



struct a

{

    int i;

};



struct b

{

    struct a struct_a;

};



struct c

{

    struct a *struct_a;

}



@implementation myClass



-(struct b*)methodReturningStructB

{

    //.

}



-(struct c*)methodReturningStructC

{

    [self
methodSignatureForSelector:@selector(methodReturningStructB)];//this is fine

    [self
methodSignatureForSelector:@selector(methodReturningStructC)];//this blows
up

}

@end



I'm modifying legacy code. Replacing the structs with objects, while
desirable, is highly impractical. Is there a known workaround?



 _______________________________________________
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: Help with an old problem - Solved
      • From: "Tim Hart" <email@hidden>
  • Prev by Date: Re: A word of caution...
  • Next by Date: Re: drawKnob in NSSliderCell subclass
  • Previous by thread: resetCursorRects being called too often?
  • Next by thread: RE: Help with an old problem - Solved
  • Index(es):
    • Date
    • Thread