com php-src: Add #defines for compatibility with PHP releases prior to the core PHP type changes.: ext/oci8/php_oci8_int.h

From: Date: Thu, 23 Jan 2014 19:13:32 +0000
Subject: com php-src: Add #defines for compatibility with PHP releases prior to the core PHP type changes.: ext/oci8/php_oci8_int.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-75768@lists.php.net to get a copy of this message
Commit: daa34699afc1dd1664fdca408a407d508a0168d7 Author: Christopher Jones <sixd@php.net> Thu, 23 Jan 2014 11:13:32 -0800 Parents: 4be5d97f3dd0f6f22112b4e33959a0c9b5191108 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=daa34699afc1dd1664fdca408a407d508a0168d7 Log: Add #defines for compatibility with PHP releases prior to the core PHP type changes. Changed paths: M ext/oci8/php_oci8_int.h Diff: diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h index 3f7c61e..0348864 100644 --- a/ext/oci8/php_oci8_int.h +++ b/ext/oci8/php_oci8_int.h @@ -56,6 +56,29 @@ #endif /* }}} */ +/* Compatibility with pre-PHP 5.6 types: https://wiki.php.net/rfc/size_t_and_int64 */ +#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 6) +typedef long zend_int_t; +typedef unsigned long zend_uint_t; +typedef int zend_size_t; +# define php_size_t zend_size_t +# define php_int_t zend_int_t +# define php_uint_t zend_uint_t +# define Z_STRSIZE_P Z_STRLEN_P +# define Z_STRSIZE_PP Z_STRLEN_PP +# define Z_IVAL Z_LVAL +# define Z_IVAL_P Z_LVAL_P +# define Z_IVAL_PP Z_LVAL_PP +# define ZVAL_INT ZVAL_LONG +# define RETURN_INT RETURN_LONG +# define REGISTER_INT_CONSTANT REGISTER_LONG_CONSTANT +# define convert_to_int convert_to_long +# define convert_to_int_ex convert_to_long_ex +# define add_assoc_int add_assoc_long +# define add_next_index_int add_next_index_long +# define ZEND_INT_FMT "%ld" +#endif /* compatibility with pre-PHP 5.6 types */ + #include "ext/standard/php_string.h" #include <oci.h>

« previous php.cvs (#75768) next »