cvs: php-src(PHP_5_3) /ext/oci8 oci8_interface.c

From: Date: Thu, 05 Feb 2009 21:43:31 +0000
Subject: cvs: php-src(PHP_5_3) /ext/oci8 oci8_interface.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-56115@lists.php.net to get a copy of this message
sixd Thu Feb 5 21:43:31 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/oci8 oci8_interface.c Log: Tweak fix for #45458 to allow this branch (from PECL) to continue building with PHP 4 et al. No other branches need changing http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_interface.c?r1=1.8.2.7.2.13.2.9&r2=1.8.2.7.2.13.2.10&diff_format=u Index: php-src/ext/oci8/oci8_interface.c diff -u php-src/ext/oci8/oci8_interface.c:1.8.2.7.2.13.2.9 php-src/ext/oci8/oci8_interface.c:1.8.2.7.2.13.2.10 --- php-src/ext/oci8/oci8_interface.c:1.8.2.7.2.13.2.9 Wed Dec 31 11:15:39 2008 +++ php-src/ext/oci8/oci8_interface.c Thu Feb 5 21:43:31 2009 @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8_interface.c,v 1.8.2.7.2.13.2.9 2008/12/31 11:15:39 sebastian Exp $ */ +/* $Id: oci8_interface.c,v 1.8.2.7.2.13.2.10 2009/02/05 21:43:31 sixd Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1399,7 +1399,13 @@ if (flags & PHP_OCI_NUM) { zend_hash_next_index_insert(Z_ARRVAL_P(row), &element, sizeof(zval*), NULL); } else { /* default to ASSOC */ +#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1) || (PHP_MAJOR_VERSION > 5) + /* zend_symtable_update is only available in 5.2+ */ zend_symtable_update(Z_ARRVAL_P(row), columns[ i ]->name, columns[ i ]->name_len+1, &element, sizeof(zval*), NULL); +#else + /* This code path means Bug #45458 will remain broken when OCI8 is built with PHP 4 */ + zend_hash_update(Z_ARRVAL_P(row), columns[ i ]->name, columns[ i ]->name_len+1, &element, sizeof(zval*), NULL); +#endif } } @@ -1431,7 +1437,13 @@ MAKE_STD_ZVAL(tmp); array_init(tmp); +#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 1) || (PHP_MAJOR_VERSION > 5) + /* zend_symtable_update is only available in 5.2+ */ zend_symtable_update(Z_ARRVAL_P(array), columns[ i ]->name, columns[ i ]->name_len+1, (void *) &tmp, sizeof(zval*), (void **) &(outarrs[ i ])); +#else + /* This code path means Bug #45458 will remain broken when OCI8 is built with PHP 4 */ + zend_hash_update(Z_ARRVAL_P(array), columns[ i ]->name, columns[ i ]->name_len+1, (void *) &tmp, sizeof(zval*), (void **) &(outarrs[ i ])); +#endif } }

« previous php.cvs (#56115) next »