时间:2021-07-01 10:21:17 帮助过:6人阅读
运行make的时候出现以下warning:
/home/x64-debian-fxy/php5-5.4.4/ext/template_parser/template_parser.c: In function 'zif_template_parser_pause':
/home/x64-debian-fxy/php5-5.4.4/ext/template_parser/template_parser.c:114:21: warning: assignment makes pointer from integer without a cast [enabled by default]
相应代码段如下:
//Fetch real object in order to fetch it's scope.
if(Z_TYPE_P(object_container) == IS_OBJECT){
//问题在下行.
real_object = Z_OBJ_P(object_container);
} else {
real_object = NULL;
}
起初我认为是宏的定义有问题,但是当我将Z_OBJ_P
替换成应该使用的zend_object_get_address
时,同样的warning会出现.
我在引入头文件时只是将php.h
引入.
不知是否有同样经历的前辈解决过这样的问题,望指教!谢谢!
想实现个简单的模板引擎扩展,最近在调试中.但是将扩展编译成so之后却发生了下面的状况:
运行make的时候出现以下warning:
/home/x64-debian-fxy/php5-5.4.4/ext/template_parser/template_parser.c: In function 'zif_template_parser_pause':
/home/x64-debian-fxy/php5-5.4.4/ext/template_parser/template_parser.c:114:21: warning: assignment makes pointer from integer without a cast [enabled by default]
相应代码段如下:
//Fetch real object in order to fetch it's scope.
if(Z_TYPE_P(object_container) == IS_OBJECT){
//问题在下行.
real_object = Z_OBJ_P(object_container);
} else {
real_object = NULL;
}
起初我认为是宏的定义有问题,但是当我将Z_OBJ_P
替换成应该使用的zend_object_get_address
时,同样的warning会出现.
我在引入头文件时只是将php.h
引入.
不知是否有同样经历的前辈解决过这样的问题,望指教!谢谢!