Thread-topic: 'pascal' keyword not accepted in typedefs
User-agent: Microsoft-Entourage/11.2.0.050811
Hi James,
My apologies, as I left out a bit of the decl. Thanks for the quick
suggestions guys.
Original:
typedef long pascal EntryProc (DeviceIDObject pObject, long iCmd);
Error:
parse error before EntryProc
James:
typedef long pascal (*EntryProc) (DeviceIDObject pObject, long iCmd);
Error:
parse error before '*' token
'pascal' declared as function returning a function
Rob
> From: "James W. Walker" <email@hidden>
> Date: Sat, 1 Oct 2005 13:48:24 -0700
> To: Carbon <email@hidden>
> Subject: Re: 'pascal' keyword not accepted in typedefs
>
>
> On Oct 1, 2005, at 1:37 PM, Robert Slifka wrote:
>
>> The error I get is "parse error before EntryProc". If I remove the
>> 'pascal'
>> keyword, the program builds, but crashes as soon as any of these
>> typedefs
>> are used. I suspect they put the pascal there for a reason!
>>
>> #ifdef __cplusplus
>> extern "C" { // Tell C++ to use C linking for these functions
>> #endif
>>
>> // Callback Functions
>> typedef pascal EntryProc (DeviceIDObject pObject, long iCmd);
>>
>
> As far as I know, you can't typedef a function, only a function
> pointer. Try:
>
> typedef pascal (*EntryProc)( DeviceIDObject pObject, long iCmd );
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Carbon-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/carbon-dev/email@hidden
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden