allstars' blog
shut the fuck up and write some code
Thursday, April 1, 2010
gcc的extension
# define PLUGIN_LOG(A, B...) do { LOGI( A , ## B ); } while(0)
看得懂上面那段code嗎
不要以為##是多的
當你的arg只有一個時 PLUGIN_LOG(A) 你就發現它的重要性了
http://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment