]> granicus.if.org Git - php/commitdiff
master renamings phase 5
authorAnatol Belski <ab@php.net>
Mon, 25 Aug 2014 19:20:44 +0000 (21:20 +0200)
committerAnatol Belski <ab@php.net>
Mon, 25 Aug 2014 19:20:44 +0000 (21:20 +0200)
18 files changed:
Zend/zend.h
Zend/zend_compile.h
Zend/zend_hash.h
Zend/zend_language_scanner.c
Zend/zend_language_scanner.l
Zend/zend_long.h
Zend/zend_multiply.h
Zend/zend_operators.h
ext/mysqli/mysqli_api.c
ext/mysqlnd/mysqlnd_ps_codec.c
ext/mysqlnd/mysqlnd_wireprotocol.c
ext/opcache/zend_accelerator_util_funcs.c
ext/pdo_firebird/php_pdo_firebird_int.h
ext/pdo_mysql/mysql_statement.c
ext/standard/pack.c
ext/standard/var_unserializer.c
ext/standard/var_unserializer.re
main/main.c

index e3770052889dbd9e40b96131062b78502ec29ccf..0e8de14cb418aa7dcd7acec4dd28a974d0bf115d 100644 (file)
@@ -273,14 +273,14 @@ char *alloca ();
 #define LONG_MIN (- LONG_MAX - 1)
 #endif
 
-#if SIZEOF_ZEND_INT == 4
+#if SIZEOF_ZEND_LONG == 4
 #define MAX_LENGTH_OF_LONG 11
 static const char long_min_digits[] = "2147483648";
-#elif SIZEOF_ZEND_INT == 8
+#elif SIZEOF_ZEND_LONG == 8
 #define MAX_LENGTH_OF_LONG 20
 static const char long_min_digits[] = "9223372036854775808";
 #else
-#error "Unknown SIZEOF_ZEND_INT"
+#error "Unknown SIZEOF_ZEND_LONG"
 #endif
 
 #define MAX_LENGTH_OF_DOUBLE 32
index af33b3e0070f1eb698b6d497f189f72741c136d8..1b4d05bcaf3f696a86e3f48cce1b550ab11eccc4 100644 (file)
@@ -128,7 +128,7 @@ typedef struct _zend_try_catch_element {
        uint32_t finally_end;
 } zend_try_catch_element;
 
-#if SIZEOF_ZEND_INT == 8
+#if SIZEOF_ZEND_LONG == 8
 # ifdef _WIN32
 #  define THIS_HASHVAL 6385726429Ui64
 # else
index 42bacc5c16c9c06738b0497221f92adcbdf53243..5508a40bdf15dc795a7d635615946c46677094fb 100644 (file)
@@ -258,7 +258,7 @@ static inline int _zend_handle_numeric_str(const char *key, size_t length, zend_
        if ((*end != '\0') /* not a null terminated string */
         || (*tmp == '0' && length > 1) /* numbers with leading zeros */
         || (end - tmp > MAX_LENGTH_OF_LONG - 1) /* number too long */
-        || (SIZEOF_ZEND_INT == 4 &&
+        || (SIZEOF_ZEND_LONG == 4 &&
             end - tmp == MAX_LENGTH_OF_LONG - 1 &&
             *tmp > '2')) { /* overflow */
                return 0;
index 33dc6eed245f13d1cc6ab6517bdf6b8c0e4f6209..3b10615513886f9f81e8626215cef722313c7f7b 100644 (file)
@@ -3314,7 +3314,7 @@ yy200:
                --len;
        }
 
-       if (len < SIZEOF_ZEND_INT * 8) {
+       if (len < SIZEOF_ZEND_LONG * 8) {
                if (len == 0) {
                        ZVAL_LONG(zendlval, 0);
                } else {
@@ -3349,7 +3349,7 @@ yy203:
                len--;
        }
 
-       if (len < SIZEOF_ZEND_INT * 2 || (len == SIZEOF_ZEND_INT * 2 && *hex <= '7')) {
+       if (len < SIZEOF_ZEND_LONG * 2 || (len == SIZEOF_ZEND_LONG * 2 && *hex <= '7')) {
                if (len == 0) {
                        ZVAL_LONG(zendlval, 0);
                } else {
index f4f327b7b6b022f83871b1d92612bdbb7283c1ee..66fa0cc7bffddc12087c3118fd2356614dde288c 100644 (file)
@@ -1521,7 +1521,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
                --len;
        }
 
-       if (len < SIZEOF_ZEND_INT * 8) {
+       if (len < SIZEOF_ZEND_LONG * 8) {
                if (len == 0) {
                        ZVAL_LONG(zendlval, 0);
                } else {
@@ -1562,7 +1562,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
                len--;
        }
 
-       if (len < SIZEOF_ZEND_INT * 2 || (len == SIZEOF_ZEND_INT * 2 && *hex <= '7')) {
+       if (len < SIZEOF_ZEND_LONG * 2 || (len == SIZEOF_ZEND_LONG * 2 && *hex <= '7')) {
                if (len == 0) {
                        ZVAL_LONG(zendlval, 0);
                } else {
index 34441c6e454cc7a1b0069854db9a7722a17f5fe8..9ac7c8e4b81edadbed9972eb131e0a374997aca3 100644 (file)
@@ -59,7 +59,7 @@ typedef off_t zend_off_t;
 #   error Cant enable 64 bit integers on non 64 bit platform
 #  endif
 # endif
-# define SIZEOF_ZEND_INT 8
+# define SIZEOF_ZEND_LONG 8
 #else
 typedef long zend_long;
 typedef unsigned long zend_ulong;
@@ -69,7 +69,7 @@ typedef long zend_off_t;
 # define ZEND_ULONG_MAX ULONG_MAX
 # define Z_I(i) i##L
 # define Z_UL(i) i##UL
-# define SIZEOF_ZEND_INT SIZEOF_LONG
+# define SIZEOF_ZEND_LONG SIZEOF_LONG
 #endif
 
 
index 71223ad1170b777d7931c120b82abc6695480d39..3a1a091b0a3d81d967e750dd102bc7ea091648a5 100644 (file)
@@ -81,7 +81,7 @@
        }                                                                                                                               \
 } while (0)
 
-#elif SIZEOF_ZEND_INT == 4 && defined(HAVE_ZEND_LONG64)
+#elif SIZEOF_ZEND_LONG == 4 && defined(HAVE_ZEND_LONG64)
 
 #define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do {      \
        zend_long64 __result = (zend_long64) (a) * (zend_long64) (b);   \
index 7e6e8b97723f23fa970501dad8fba4c704c4ab6f..def3db0cf26965ab3fd407ec97ca739f78558459 100644 (file)
@@ -73,7 +73,7 @@ END_EXTERN_C()
 
 #if ZEND_DVAL_TO_LVAL_CAST_OK
 # define zend_dval_to_lval(d) ((zend_long) (d))
-#elif SIZEOF_ZEND_INT == 4
+#elif SIZEOF_ZEND_LONG == 4
 static zend_always_inline zend_long zend_dval_to_lval(double d)
 {
        if (d > ZEND_LONG_MAX || d < ZEND_LONG_MIN) {
@@ -202,7 +202,7 @@ check_digits:
                                dp_or_e = -1;
                                goto process_double;
                        }
-               } else if (!(digits < SIZEOF_ZEND_INT * 2 || (digits == SIZEOF_ZEND_INT * 2 && ptr[-digits] <= '7'))) {
+               } else if (!(digits < SIZEOF_ZEND_LONG * 2 || (digits == SIZEOF_ZEND_LONG * 2 && ptr[-digits] <= '7'))) {
                        if (dval) {
                                local_dval = zend_hex_strtod(str, &ptr);
                        }
index 7b7f7e582bb58f3b51d3ead22b592ed8434109f8..f6286af4c4ced03eaab86b2342a541bae87d0b86 100644 (file)
@@ -213,9 +213,9 @@ int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int argc, unsigned in
                                break;
 
                        case 'i': /* Integer */
-#if SIZEOF_ZEND_INT==8
+#if SIZEOF_ZEND_LONG==8
                                bind[ofs].buffer_type = MYSQL_TYPE_LONGLONG;
-#elif SIZEOF_ZEND_INT==4
+#elif SIZEOF_ZEND_LONG==4
                                bind[ofs].buffer_type = MYSQL_TYPE_LONG;
 #endif
                                bind[ofs].buffer = &Z_LVAL_P(param);
@@ -284,9 +284,9 @@ int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int argc, unsigned in
                                type = MYSQL_TYPE_DOUBLE;
                                break;
                        case 'i': /* Integer */
-#if SIZEOF_ZEND_INT==8
+#if SIZEOF_ZEND_LONG==8
                                type = MYSQL_TYPE_LONGLONG;
-#elif SIZEOF_ZEND_INT==4
+#elif SIZEOF_ZEND_LONG==4
                                type = MYSQL_TYPE_LONG;
 #endif
                                break;
@@ -996,7 +996,7 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS)
                                                {
                                                        /* unsigned int (11) */
                                                        uval= *(unsigned int *) stmt->result.buf[i].val;
-#if SIZEOF_ZEND_INT==4
+#if SIZEOF_ZEND_LONG==4
                                                        if (uval > INT_MAX) {
                                                                char *tmp, *p;
                                                                int j = 10;
@@ -1047,9 +1047,9 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS)
                                                        {
                                                                llval= *(my_ulonglong *) stmt->result.buf[i].val;
                                                        }
-#if SIZEOF_ZEND_INT==8
+#if SIZEOF_ZEND_LONG==8
                                                        if (uns && llval > 9223372036854775807L) {
-#elif SIZEOF_ZEND_INT==4
+#elif SIZEOF_ZEND_LONG==4
                                                        if ((uns && llval > L64(2147483647)) ||
                                                                (!uns && (( L64(2147483647) < (my_longlong) llval) ||
                                                                (L64(-2147483648) > (my_longlong) llval))))
index cfe6f26280f42af097aae5c697540a96c96a416a..2e414cacef610979885eb35361cc2c5275173331 100644 (file)
@@ -76,7 +76,7 @@ ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, unsigne
                        case 1:uval = (uint64_t) uint1korr(*row);break;
                }
 
-#if SIZEOF_ZEND_INT==4
+#if SIZEOF_ZEND_LONG==4
                if (uval > INT_MAX) {
                        DBG_INF("stringify");
                        tmp_len = sprintf((char *)&tmp, MYSQLND_LLU_SPEC, uval);
@@ -105,7 +105,7 @@ ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, unsigne
                        case 1:lval = (int64_t) *(int8_t*)*row;break;
                }
 
-#if SIZEOF_ZEND_INT==4
+#if SIZEOF_ZEND_LONG==4
                if ((L64(2147483647) < (int64_t) lval) || (L64(-2147483648) > (int64_t) lval)) {
                        DBG_INF("stringify");
                        tmp_len = sprintf((char *)&tmp, MYSQLND_LL_SPEC, lval);
@@ -663,7 +663,7 @@ mysqlnd_stmt_execute_store_types(MYSQLND_STMT_DATA * stmt, zval * copies, zend_u
                short current_type = stmt->param_bind[i].type;
                zval *parameter = &stmt->param_bind[i].zv;
                /* our types are not unsigned */
-#if SIZEOF_ZEND_INT==8  
+#if SIZEOF_ZEND_LONG==8  
                if (current_type == MYSQL_TYPE_LONG) {
                        current_type = MYSQL_TYPE_LONGLONG;
                }
index 5af676d02fa4ca3a267f74e8754cba76f6f55dd7..a6e2517b2bcd8fa38cb7d6e1127199fb07e108df 100644 (file)
@@ -1671,7 +1671,7 @@ php_mysqlnd_rowp_read_text_protocol_aux(MYSQLND_MEMORY_POOL_CHUNK * row_buffer,
                                zend_uchar save = *(p + len);
                                /* We have to make it ASCIIZ temporarily */
                                *(p + len) = '\0';
-                               if (perm_bind.pack_len < SIZEOF_ZEND_INT) {
+                               if (perm_bind.pack_len < SIZEOF_ZEND_LONG) {
                                        /* direct conversion */
                                        int64_t v =
 #ifndef PHP_WIN32
@@ -1689,9 +1689,9 @@ php_mysqlnd_rowp_read_text_protocol_aux(MYSQLND_MEMORY_POOL_CHUNK * row_buffer,
 #endif
                                        zend_bool uns = fields_metadata[i].flags & UNSIGNED_FLAG? TRUE:FALSE;
                                        /* We have to make it ASCIIZ temporarily */
-#if SIZEOF_ZEND_INT==8
+#if SIZEOF_ZEND_LONG==8
                                        if (uns == TRUE && v > 9223372036854775807L)
-#elif SIZEOF_ZEND_INT==4
+#elif SIZEOF_ZEND_LONG==4
                                        if ((uns == TRUE && v > L64(2147483647)) ||
                                                (uns == FALSE && (( L64(2147483647) < (int64_t) v) ||
                                                (L64(-2147483648) > (int64_t) v))))
index 46eb03ee47ca5d5f8bc6abd2b1782453dea31914..dd5340e5729948e84b06b80a0a950a2b5fed290e 100644 (file)
@@ -29,7 +29,7 @@
 
 static uint32_t zend_accel_refcount = ZEND_PROTECTED_REFCOUNT;
 
-#if SIZEOF_SIZE_T <= SIZEOF_ZEND_INT
+#if SIZEOF_SIZE_T <= SIZEOF_ZEND_LONG
 /* If sizeof(void*) == sizeof(ulong) we can use zend_hash index functions */
 # define accel_xlat_set(old, new)      zend_hash_index_update_ptr(&ZCG(bind_hash), (zend_ulong)(zend_uintptr_t)(old), (new))
 # define accel_xlat_get(old)           zend_hash_index_find_ptr(&ZCG(bind_hash), (zend_ulong)(zend_uintptr_t)(old))
index 20baebacaa37ed934dda52a4958e1c6f017c8cf3..1fc610ce787b13b18d5b03f1e8879dce872f4499 100644 (file)
@@ -35,7 +35,7 @@
 
 #define SHORT_MAX (1 << (8*sizeof(short)-1))
 
-#if SIZEOF_ZEND_INT == 8 && !defined(PHP_WIN32)
+#if SIZEOF_ZEND_LONG == 8 && !defined(PHP_WIN32)
 # define LL_MASK "l"
 # define LL_LIT(lit) lit ## L
 #else
index 909527eed2a31e767f9d0fa3028ab4bc9b598e11..5eddc832a17c10a5b1fa438b444d19317dda3a37 100644 (file)
@@ -551,9 +551,9 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da
                                                mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_VAR_STRING);
                                                break;
                                        case IS_LONG:
-#if SIZEOF_ZEND_INT==8
+#if SIZEOF_ZEND_LONG==8
                                                mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_LONGLONG);
-#elif SIZEOF_ZEND_INT==4
+#elif SIZEOF_ZEND_LONG==4
                                                mysqlnd_stmt_bind_one_param(S->stmt, param->paramno, parameter, MYSQL_TYPE_LONG);
 #endif /* SIZEOF_LONG */
                                                break;
index 59f878e21780deccaa81ae8b56bfba916aa43c91..556a96d374746f4f39e9d2331fbaa917ef903dc6 100644 (file)
@@ -829,12 +829,12 @@ PHP_FUNCTION(unpack)
                                                        map = little_endian_long_map;
                                                }
 
-                                               if (SIZEOF_ZEND_INT > 4 && issigned) {
+                                               if (SIZEOF_ZEND_LONG > 4 && issigned) {
                                                        v = ~INT_MAX;
                                                }
 
                                                v |= php_unpack(&input[inputpos], 4, issigned, map);
-                                               if (SIZEOF_ZEND_INT > 4) {
+                                               if (SIZEOF_ZEND_LONG > 4) {
                                                        if (type == 'l') {
                                                                v = (signed int) v; 
                                                        } else {
index 3ae0aaf633b78d4ec4ed607e6035ed69802187b7..8d9899f81fba4b33d131b65f72f4c90ed163f5b9 100644 (file)
@@ -1023,7 +1023,7 @@ yy63:
        ++YYCURSOR;
 #line 588 "ext/standard/var_unserializer.re"
        {
-#if SIZEOF_ZEND_INT == 4
+#if SIZEOF_ZEND_LONG == 4
 use_double:
 #endif
        *p = YYCURSOR;
@@ -1134,7 +1134,7 @@ yy79:
        ++YYCURSOR;
 #line 546 "ext/standard/var_unserializer.re"
        {
-#if SIZEOF_ZEND_INT == 4
+#if SIZEOF_ZEND_LONG == 4
        int digits = YYCURSOR - start - 3;
 
        if (start[2] == '-' || start[2] == '+') {
index 054580ac4130ac7be2ebe44294380a2507ac0efa..988666b2de90f16f9438545c06e5fef29c59e14c 100644 (file)
@@ -544,7 +544,7 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER)
 }
 
 "i:" iv ";"    {
-#if SIZEOF_ZEND_INT == 4
+#if SIZEOF_ZEND_LONG == 4
        int digits = YYCURSOR - start - 3;
 
        if (start[2] == '-' || start[2] == '+') {
@@ -586,7 +586,7 @@ PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER)
 }
 
 "d:" (iv | nv | nvexp) ";"     {
-#if SIZEOF_ZEND_INT == 4
+#if SIZEOF_ZEND_LONG == 4
 use_double:
 #endif
        *p = YYCURSOR;
index 66cbe2bcbd0dbb5c50ebb68e4eed42b2a866a6ff..9b5c41079cb9ada7f8e139473557b56f6828cfb0 100644 (file)
@@ -2214,7 +2214,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
        REGISTER_MAIN_LONG_CONSTANT("PHP_MAXPATHLEN", MAXPATHLEN, CONST_PERSISTENT | CONST_CS);
        REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MAX", ZEND_LONG_MAX, CONST_PERSISTENT | CONST_CS);
        REGISTER_MAIN_LONG_CONSTANT("PHP_INT_MIN", ZEND_LONG_MIN, CONST_PERSISTENT | CONST_CS);
-       REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", SIZEOF_ZEND_INT, CONST_PERSISTENT | CONST_CS);
+       REGISTER_MAIN_LONG_CONSTANT("PHP_INT_SIZE", SIZEOF_ZEND_LONG, CONST_PERSISTENT | CONST_CS);
 
 #ifdef PHP_WIN32
        REGISTER_MAIN_LONG_CONSTANT("PHP_WINDOWS_VERSION_MAJOR",      EG(windows_version_info).dwMajorVersion, CONST_PERSISTENT | CONST_CS);