php模块不编译.不认识“;static function_entry”;


php module does not compile. Does not recognize "static function_entry"

我最近重新编译了php,突然旧代码(以及来自互联网的示例)停止了编译。

这个确切的例子没有编译。

问题代码片段:

static function_entry hello_functions[] = {
  {NULL, NULL, NULL}
};

这就是错误:

/home/user/php_module/test_module/hello.c:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘hello_functions’

可能是什么问题?

解决方案
这是新php 5.4的不同之处在这里找到答案

必须用静态zend_function_entry 替换function_entry

现在工作。