Re: Advice needed about a possible bug in NSMethodSignature or NSInvocation
Re: Advice needed about a possible bug in NSMethodSignature or NSInvocation
- Subject: Re: Advice needed about a possible bug in NSMethodSignature or NSInvocation
- From: Thomas Lachand-Robert <email@hidden>
- Date: Fri, 12 Mar 2004 10:09:59 +0100
Le 12 mars 04, ` 07:29, Cameron Hayne a icrit :
On 3/10/04 1:08 PM, "Thomas Lachand-Robert" <email@hidden> wrote:
Usually in C "typedef SomeType SomeName" has the same effect
than "#define SomeName SomeType".
I'm afraid you are wrong on that.
Consider this example (common in pre-C++ C):
typedef char* String;
The declaration of the two variables 'foo' & 'bar' in the following
statement:
String foo, bar;
is equivalent to:
char *foo, *bar;
but if you had instead done:
#define String char*
you would obviously get something quite different from the statement:
String foo, bar;
You are right, and this statement was intentionnally vague. But this
difference is precisely the reason for which I want to use
typedef SomeClass<SomeProtocol> SomeName
and not
typedef SomeClass<SomeProtocol>* SomeName
The former is equivalent to #define SomeName SomeClass<SomeProtocol>,
except with respect to NSInvocation as I explained in my first message.
Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.
_______________________________________________
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.