在
#define __ptr_t void *
而不是使用
typedef void * __ptr_t
因为对于 const __ptr_t
前者会直接展开为 const void *
,解释为指向 const void的指针
而后面则相当于 void * const
,解释为const指针,指向void
在
#define __ptr_t void *
而不是使用
typedef void * __ptr_t
因为对于 const __ptr_t
前者会直接展开为 const void *
,解释为指向 const void的指针
而后面则相当于 void * const
,解释为const指针,指向void