阅读Zend引擎API code:什么是##(双哈希)是什么意思? [英] Reading Zend Engine API code: What does ## (double hash) mean?

查看:132
本文介绍了阅读Zend引擎API code:什么是##(双哈希)是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于好奇,我读了Zend Engine API code和遇到的#不少##中定义的。例如,在/usr/lib/php5/Zend/zend_API.h:

Out of curiousity, I'm reading the Zend Engine API code and encountered quite a number of ## in their #define's. For example, at /usr/lib/php5/Zend/zend_API.h:

#define ZEND_FN(name) zif_##name
#define ZEND_MN(name) zim_##name

什么的##(双哈希)符号这两行是什么意思?

What does the ## (double hash) symbols mean in these two lines?

推荐答案

##的符连接使用后有什么##之前有什么。所以,在你的榜样做 ZEND_FN(富)将导致 zif_foo

The ## concatenates what's before the ## with what's after it. So in your example doing ZEND_FN(foo) would result in zif_foo

这篇关于阅读Zend引擎API code:什么是##(双哈希)是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆