麻烦懂C的个解释下!
#ifndef av_const
#if defined(__GNUC__) && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ > 5)
# define av_const __attribute__((const))
#else
# define av_const
#endif
#endif
下面这2行到底定义了个什么东西?
# define av_const __attribute__((const))
# define av_const
还有:
typedef struct AVRational{
int num; ///< numerator
int den; ///< denominator
} AVRational;
AVRational av_mul_q(AVRational b, AVRational c) av_const;
AVRational av_div_q(AVRational b, AVRational c) av_const;
上面这2个函数定义的后面的av_const(就是上面定义的)表示什么?这个函数是返回了这个结构还是这个结构的指针?
谢谢!