Browse Source

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.
PECL
Andrey Hristov 18 years ago
parent
commit
259b652b2e
  1. 5
      ext/mysqli/mysqli.c
  2. 5
      ext/mysqli/mysqli_nonapi.c

5
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);

5
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)

Loading…
Cancel
Save