RE: [ROOT] rootcint typedef problem

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Thu Jul 20 2000 - 14:06:12 MEST


Hello Jacek,

This is obviously a limitation of cint. I've never thought of this
kind of use. Please help me understand what it means.  I guess ...


typedef void NIVXI_HWSSECMD (UINT16 cmdExt, UINT32 cmd);
  >>> NIVXI_HWSSECMD is a type of function

extern NIVXI_HWSSECMD *GetWSSEcmdHandler(void);
  >>> Get WSSEcmdHandler returns pointer to function of type NIVXI_HWSSECMD

extern NIVXI_STATUS SetWSSEcmdHandler(NIVXI_HWSSECMD *func);
  >>> SetWSSEcmdHandler takes pointer to function of type NIVXI_HWSSECMD as
      an argument

extern NIVXI_HWSSECMD DefaultWSSEcmdHandler
  >>> This is equivalent to 
        extern void DefaultWSSEcmdHandler(UINT16 cmdExt,UINT32 cmd);

Are those correct?

Thank you
Masaharu Goto

>
>Hi,
>Thanks for help, but ...
>
>> > extern NIVXI_HWSSECMD DefaultWSSEcmdHandler;            /* <- LINE:1600 *
/
>> You probably meant to type 
>> > extern NIVXI_HWSSECMD* DefaultWSSEcmdHandler;            /* <- LINE:1600 
*/
>No. The DefaultWSSEcmdHandler is a function, not a pointer.
>
>> I think the typedef must be:
>> typedef void (*NIVXI_HWSSECMD) (UINT16 cmdExt, UINT32 cmd);
>Again no. It should not be a pointer to a function, but the function
>itself.
>
>I think that this is some kind of a limitation pr bug of cint and I'd
>appreciate a clear statement about it.
>Jacek.
>



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:30 MET