Help with an old problem
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