Z_OBJ_Pwarning problems encountered in compiling PHP extensions

Source: Internet
Author: User
I want to implement a simple template engine extension, which is being debugged recently. however, after the extension is compiled to so, the following situation occurs: when running make, the following warning occurs: {code ...} the code snippet is as follows: {code ...} at first I thought there was a problem with macro definition, but when I replaced Z_OBJ_P... I want to implement a simple template engine extension, which is being debugged recently. however, after the extension is compiled into so, the following situation occurs:

When running make, the following warning occurs:

/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]

The code snippet is as follows:

// Fetch real object in order to fetch it's scope. if (Z_TYPE_P (object_container) = IS_OBJECT) {// The Problem Is going downstream. real_object = Z_OBJ_P (object_container);} else {real_object = NULL ;}

At first I thought there was a problem with macro definition, but when IZ_OBJ_PReplace with the expectedzend_object_get_addressWhen the header file is introducedphp.hIntroduction. I wonder if any of my predecessors who have the same experience have solved this problem. Please advise! Thank you!

Reply content:

I want to implement a simple template engine extension. Recently in debugging, the following situation occurs after the extension is compiled into so:

When running make, the following warning occurs:

/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]

The code snippet is as follows:

// Fetch real object in order to fetch it's scope. if (Z_TYPE_P (object_container) = IS_OBJECT) {// The Problem Is going downstream. real_object = Z_OBJ_P (object_container);} else {real_object = NULL ;}

At first I thought there was a problem with macro definition, but when IZ_OBJ_PReplace with the expectedzend_object_get_addressWhen the header file is introducedphp.hIntroduction. I wonder if any of my predecessors who have the same experience have solved this problem. Please advise! Thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.