函数指针模块化声明方法

#ifdef HAVE_PROTOTYPES
#define JMETHOD(type,methodname,arglist)  type (*methodname) arglist
#else
#define JMETHOD(type,methodname,arglist)  type (*methodname) ()
#endif
 
typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo));
    --->typedef boolean (* jpeg_marker_parser_method) (j_decompress_ptr cinfo);即函数指针
 
typedef struct jpeg_decompress_struct * j_decompress_ptr;
posted @ 2017-02-06 22:09  suonikeyinsu  Views(330)  Comments(0Edit  收藏  举报