|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2018-03-19 08:07 UTC] guy dot baconniere at applic8 dot com
Description: ------------ Unable to compile ibm_db2 with any PHP 7.2 branch due to removal of IS_TYPE_IMMUTABLE from php-src/Zend/zend.h http://php.net/ChangeLog-7.php Version 7.2.0 30 Nov 2017 Core: Removed IS_TYPE_IMMUTABLE (it's the same as COPYABLE & !REFCOUNTED). (Dmitry) Check https://bugs.php.net/bug.php?id=76021 for the full log This ticket is about the missing IS_TYPE_IMMUTABLE while 76021 is about the warning warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Test script: --------------- Install Ubuntu 18.04 http://cdimage.ubuntu.com/ubuntu-server/daily/current/ and run pecl install ibm_db2 with any version of DB2 DS Driver (IBM Data Server Driver) DB2 Installation Directory? : /opt/ibm/dsdriver from ibm_data_server_driver_package_linuxx64_v11.1.tar.gz DB2 Installation Directory? : /opt/ibm/dsdriver from ibm_data_server_driver_package_linuxx64_v10.5.tar.gz Expected result: ---------------- Compile correctly Actual result: -------------- /tmp/pear/temp/ibm_db2/ibm_db2.c:5106:107: error: ‘IS_TYPE_IMMUTABLE’ undeclared (first use in this function); did you mean ‘IS_ARRAY_IMMUTABLE’? if (parameters_array && Z_TYPE_P(parameters_array) == IS_ARRAY && (Z_TYPE_FLAGS_P(parameters_array) & IS_TYPE_IMMUTABLE)) { ^~~~~~~~~~~~~~~~~ IS_ARRAY_IMMUTABLE /tmp/pear/temp/ibm_db2/ibm_db2.c:5106:107: note: each undeclared identifier is reported only once for each function it appears in /tmp/pear/temp/ibm_db2/ibm_db2.c: In function ‘zif_db2_execute_many’: /tmp/pear/temp/ibm_db2/ibm_db2.c:7820:77: error: ‘IS_TYPE_IMMUTABLE’ undeclared (first use in this function); did you mean ‘IS_ARRAY_IMMUTABLE’? if (params && Z_TYPE_P(params) == IS_ARRAY && (Z_TYPE_FLAGS_P(params) & IS_TYPE_IMMUTABLE)) { ^~~~~~~~~~~~~~~~~ IS_ARRAY_IMMUTABLE Patchesibm_db2_IS_TYPE_IMMUTABLE.patch (last revision 2018-03-19 09:05 UTC by guy dot baconniere at applic8 dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 09:00:01 2025 UTC |
git log -S IS_TYPE_IMMUTABLE git diff 3e9bb03a62393d7bad1a0261b7a312c2ced8aac0 e. IS_TYPE_IMMUTABLE is removed, IS_TYPE_COPYABLE can be used instead Z_IMMUTABLE() check function is still available commit 6499162ff0d8aa6e862d3e3cdd2288b87636b8a1 Date: Thu Apr 28 04:13:34 2016 +0300 - get rid of EG(scope). zend_get_executed_scope() should be used instead. - ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter. git diff 6499162ff0d8aa6e862d3e3cdd2288b87636b8a1 | less --- a/Zend/zend_types.h +++ b/Zend/zend_types.h /* zval.u1.v.type_flags */ -#define IS_TYPE_CONSTANT (1<<0) -#define IS_TYPE_IMMUTABLE (1<<1) -#define IS_TYPE_REFCOUNTED (1<<2) -#define IS_TYPE_COLLECTABLE (1<<3) -#define IS_TYPE_COPYABLE (1<<4) +#define IS_TYPE_REFCOUNTED (1<<0) + +#if 1 +/* This optimized version assumes that we have a single "type_flag" */ +# define Z_TYPE_INFO_REFCOUNTED(t) (((t) & Z_TYPE_FLAGS_MASK) != 0) +#else +# define Z_TYPE_INFO_REFCOUNTED(t) (((t) & (IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT)) != 0) +#endif