From: Andrey Hristov Date: Tue, 6 May 2008 17:05:14 +0000 (+0000) Subject: Make mysqli compilable in a 5_2 environment. Some want to use mysqlnd+mysqli X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~273 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=259b652b2e5f589834d787dda06ffa85bb8352a0;p=php Make mysqli compilable in a 5_2 environment. Some want to use mysqlnd+mysqli with 5_2. This won't hurt 5_2 in any way. Won't be MFB-ed because HEAD is completely different. --- diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 84a07319cd..2fc0b00cd0 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -512,6 +512,7 @@ static int mysqli_object_has_property(zval *object, zval *member, int has_set_ex } /* }}} */ +#if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3 HashTable * mysqli_object_get_debug_info(zval *object, int *is_temp TSRMLS_DC) { mysqli_object *obj = (mysqli_object *)zend_objects_get_address(object TSRMLS_CC); @@ -539,7 +540,7 @@ HashTable * mysqli_object_get_debug_info(zval *object, int *is_temp TSRMLS_DC) *is_temp = 1; return retval; } - +#endif /* {{{ mysqli_objects_new */ @@ -708,7 +709,9 @@ PHP_MINIT_FUNCTION(mysqli) mysqli_object_handlers.get_property_ptr_ptr = std_hnd->get_property_ptr_ptr; mysqli_object_handlers.get_constructor = php_mysqli_constructor_get; mysqli_object_handlers.has_property = mysqli_object_has_property; +#if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3 mysqli_object_handlers.get_debug_info = mysqli_object_get_debug_info; +#endif zend_hash_init(&classes, 0, NULL, NULL, 1); diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 9b18e8c383..27e6b4ebd4 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -33,6 +33,11 @@ #define SAFE_STR(a) ((a)?a:"") +#ifndef zend_parse_parameters_none +#define zend_parse_parameters_none() \ + zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") +#endif + /* {{{ php_mysqli_set_error */ static void php_mysqli_set_error(long mysql_errno, char *mysql_err TSRMLS_DC)