`
andrew__
  • 浏览: 9044 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

编写PHP扩展函数需要了解的宏定义

    博客分类:
  • PHP
阅读更多
ZEND_FUNCTION()宏函数
ZEND_FUNCTION()宏函数也可以写成PHP_FUNCTION(),但ZEND_FUNCTION()更前卫、标准一些,但两者是完全相同的。

#define PHP_FUNCTION                ZEND_FUNCTION

#define ZEND_FUNCTION(name)         ZEND_NAMED_FUNCTION(ZEND_FN(name))
#define ZEND_NAMED_FUNCTION(name)   void name(INTERNAL_FUNCTION_PARAMETERS)
#define ZEND_FN(name)               zif_##name

#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC

#define ZEND_FE(name, arg_info)     ZEND_FENTRY(name, ZEND_FN(name), arg_info, 0)
#define ZEND_FENTRY(zend_name, name, arg_info, flags)   { #zend_name, name, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics