]> granicus.if.org Git - php/commitdiff
- Fix ZVAL_ZSTRL
authorMarcus Boerger <helly@php.net>
Tue, 19 Dec 2006 21:13:21 +0000 (21:13 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 19 Dec 2006 21:13:21 +0000 (21:13 +0000)
README.UNICODE-UPGRADES
Zend/zend_API.h
Zend/zend_execute_API.c
ext/reflection/php_reflection.c
ext/standard/array.c

index ea81bf0e3537ebc6d146c324a406a50dc2609052..f4af18f016056f8e6f4809ca169d09f8c6400711 100644 (file)
@@ -100,7 +100,7 @@ ZVAL_UTF8_STRING(pzv, str, dup), ZVAL_UTF8_STRINGL(pzv, str, str_len, dup)
    for 'dup' does not matter, but ZSTR_AUTOFREE will be used will be used to
    efree the original value
 
-ZVAL_ZSTR(pzv, zstr, type, dup), ZVAL_ZSTRL(pzv, zstr, zstr_len, type, dup)
+ZVAL_ZSTR(pzv, zstr, type, dup), ZVAL_ZSTRL(pzv, zstr, type, zstr_len, dup)
  - This macro uses 'type' to switch between calling ZVAL_STRING(pzv, zstr.s, dup)
    and ZVAL_UNICODE(pzv, zstr.u, dup).  No conversion happens so the
    presense of absense of ZSTR_AUTOFREE is ignored.
index 62015462f0e1611df9e2bd972dccd4dedac5de1b..ccdb5383eb6bbc129bbb3dbd4c8227a3edc1bc2b 100644 (file)
@@ -395,7 +395,7 @@ ZEND_API int add_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *value);
 #define add_assoc_zstrl_ex(arg, key, key_len, type, str, length, duplicate) do { \
                zval *___tmp; \
                MAKE_STD_ZVAL(___tmp); \
-               ZVAL_ZSTRL(___tmp, str, length, type, duplicate); \
+               ZVAL_ZSTRL(___tmp, str, type, length, duplicate); \
                add_assoc_zval_ex(arg, key, key_len, ___tmp); \
        } while (0)
 #define add_assoc_text_ex(arg, key, key_len, str, duplicate) do { \
@@ -538,7 +538,7 @@ ZEND_API int add_ascii_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *v
 #define add_ascii_assoc_zstrl_ex(arg, key, key_len, type, str, length, duplicate) do { \
                zval *___tmp; \
                MAKE_STD_ZVAL(___tmp); \
-               ZVAL_ZSTRL(___tmp, str, length, type, duplicate); \
+               ZVAL_ZSTRL(___tmp, str, type, length, duplicate); \
                add_ascii_assoc_zval_ex(arg, key, key_len, ___tmp); \
        } while (0)
 #define add_ascii_assoc_text_ex(arg, key, key_len, str, duplicate) do { \
@@ -682,7 +682,7 @@ ZEND_API int add_rt_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *valu
 #define add_rt_assoc_zstrl_ex(arg, key, key_len, type, str, length, duplicate) do { \
                zval *___tmp; \
                MAKE_STD_ZVAL(___tmp); \
-               ZVAL_ZSTRL(___tmp, str, length, type, duplicate); \
+               ZVAL_ZSTRL(___tmp, str, type, length, duplicate); \
                add_rt_assoc_zval_ex(arg, key, key_len, ___tmp); \
        } while (0)
 #define add_rt_assoc_text_ex(arg, key, key_len, str, duplicate) do { \
@@ -826,7 +826,7 @@ ZEND_API int add_utf8_assoc_zval_ex(zval *arg, char *key, uint key_len, zval *va
 #define add_utf8_assoc_zstrl_ex(arg, key, key_len, type, str, length, duplicate) do { \
                zval *___tmp; \
                MAKE_STD_ZVAL(___tmp); \
-               ZVAL_ZSTRL(___tmp, str, length, type, duplicate); \
+               ZVAL_ZSTRL(___tmp, str, type, length, duplicate); \
                add_utf8_assoc_zval_ex(arg, key, key_len, ___tmp); \
        } while (0)
 #define add_utf8_assoc_text_ex(arg, key, key_len, str, duplicate) do { \
@@ -979,7 +979,7 @@ ZEND_API int add_utf8_property_zval_ex(zval *arg, char *key, uint key_len, zval
 #define add_utf8_property_zstrl_ex(arg, key, key_len, type, str, length, duplicate) do { \
                zval *___tmp; \
                MAKE_STD_ZVAL(___tmp); \
-               ZVAL_ZSTRL(___tmp, str, length, type, duplicate); \
+               ZVAL_ZSTRL(___tmp, str, type, length, duplicate); \
                add_utf8_property_zval_ex(arg, key, key_len, ___tmp TSRMLS_CC); \
                zval_ptr_dtor(&___tmp); /* write_property will add 1 to refcount */ \
        } while (0)
@@ -1098,7 +1098,7 @@ ZEND_API int add_u_assoc_zval_ex(zval *arg, zend_uchar type, zstr key, uint key_
 #define add_u_assoc_zstrl_ex(arg, key_type, key, key_len, type, str, length, duplicate) do { \
                zval *___tmp; \
                MAKE_STD_ZVAL(___tmp); \
-               ZVAL_ZSTRL(___tmp, str, length, type, duplicate); \
+               ZVAL_ZSTRL(___tmp, str, type, length, duplicate); \
                add_u_assoc_zval_ex(arg, key_type, key, key_len, ___tmp); \
        } while (0)
 #define add_u_assoc_text_ex(arg, type, key, key_len, str, duplicate) do { \
@@ -1242,7 +1242,7 @@ ZEND_API int add_index_zval(zval *arg, ulong index, zval *value);
 #define add_index_zstrl(arg, idx, type, str, length, duplicate) do { \
                zval *___tmp; \
                MAKE_STD_ZVAL(___tmp); \
-               ZVAL_ZSTRL(___tmp, str, length, type, duplicate); \
+               ZVAL_ZSTRL(___tmp, str, type, length, duplicate); \
                add_index_zval(arg, idx, ___tmp); \
        } while (0)
 #define add_index_text(arg, idx, str, duplicate) do { \
@@ -1365,7 +1365,7 @@ ZEND_API int add_next_index_zval(zval *arg, zval *value);
 #define add_next_index_zstrl(arg, type, str, length, duplicate) do { \
                zval *___tmp; \
                MAKE_STD_ZVAL(___tmp); \
-               ZVAL_ZSTRL(___tmp, str, length, type, duplicate); \
+               ZVAL_ZSTRL(___tmp, str, type, length, duplicate); \
                add_next_index_zval(arg, ___tmp); \
        } while (0)
 #define add_next_index_text(arg, str, duplicate) do { \
@@ -1718,7 +1718,7 @@ END_EXTERN_C()
                Z_TYPE_P(z) = type;                        \
        }
 
-#define ZVAL_ZSTRL(z, zs, l, type, duplicate) { \
+#define ZVAL_ZSTRL(z, zs, type, l, duplicate) { \
                zstr __s=(zs); int __l=l;                               \
                Z_UNILEN_P(z) = __l;                                    \
                Z_UNIVAL_P(z) = ZSTR(duplicate?                 \
@@ -1820,7 +1820,7 @@ END_EXTERN_C()
 #define RETVAL_TEXTL(t, l, duplicate) ZVAL_TEXTL(return_value, t, l, duplicate)
 #define RETVAL_EMPTY_TEXT()                    ZVAL_EMPTY_TEXT(return_value)
 #define RETVAL_ZSTR(s, type, duplicate) ZVAL_ZSTR(return_value, s, type, duplicate)
-#define RETVAL_ZSTRL(s, l, type, duplicate) ZVAL_ZSTRL(return_value, s, l, type, duplicate)
+#define RETVAL_ZSTRL(s, l, type, duplicate) ZVAL_ZSTRL(return_value, s, type, l, duplicate)
 
 #define RETURN_RESOURCE(l)                             { RETVAL_RESOURCE(l); return; }
 #define RETURN_BOOL(b)                                         { RETVAL_BOOL(b); return; }
index 762b2c9fe8b2aaadb803e12ce4fdc6ea69374276..90d4cd761b9b342a8883ab9e2e08caae7402791f 100644 (file)
@@ -1134,7 +1134,7 @@ ZEND_API int zend_u_lookup_class_ex(zend_uchar type, zstr name, int name_length,
 
        ALLOC_ZVAL(class_name_ptr);
        INIT_PZVAL(class_name_ptr);
-       ZVAL_ZSTRL(class_name_ptr, name, name_length, type, 1);
+       ZVAL_ZSTRL(class_name_ptr, name, type, name_length, 1);
 
        args[0] = &class_name_ptr;
 
index 7fd68e2153a49c27f297f53b55b75fdd85fd1d17..007b473c59b43586e555af6c5a842bef5aed8544 100644 (file)
@@ -2190,7 +2190,7 @@ ZEND_METHOD(reflection_method, __construct)
                } else {
                        tmp_len = tmp.s - name_str.s;
                }
-               ZVAL_ZSTRL(classname, name_str, tmp_len, type, 1);
+               ZVAL_ZSTRL(classname, name_str, type, tmp_len, 1);
                name_len = name_len - (tmp_len + 2);
                if (type == IS_UNICODE) {
                        name_str.u = tmp.u + 2;
index 7b429f93e7808c6c1db3dad79ebad2e450e8238d..c1dccdbcf76ae1185a58dcb9684059ace571ae0d 100644 (file)
@@ -1436,7 +1436,7 @@ PHP_FUNCTION(extract)
                                        break;
                                }
                        
-                               ZVAL_ZSTRL(&final_name, var_name, var_name_len, key_type, 1);
+                               ZVAL_ZSTRL(&final_name, var_name, key_type, var_name_len, 1);
                                break;
 
                        case EXTR_PREFIX_IF_EXISTS:
@@ -1447,7 +1447,7 @@ PHP_FUNCTION(extract)
 
                        case EXTR_PREFIX_SAME:
                                if (!var_exists && var_name_len != 0) {
-                                       ZVAL_ZSTRL(&final_name, var_name, var_name_len, key_type, 1);
+                                       ZVAL_ZSTRL(&final_name, var_name, key_type, var_name_len, 1);
                                }
                                /* break omitted intentionally */
 
@@ -1462,14 +1462,14 @@ PHP_FUNCTION(extract)
                                        if (!php_valid_var_name(var_name, var_name_len, key_type)) {
                                                php_prefix_varname(&final_name, prefix, var_name, var_name_len, key_type, 1 TSRMLS_CC);
                                        } else {
-                                               ZVAL_ZSTRL(&final_name, var_name, var_name_len, key_type, 1);
+                                               ZVAL_ZSTRL(&final_name, var_name, key_type, var_name_len, 1);
                                        }
                                }
                                break;
 
                        default:
                                if (!var_exists) {
-                                       ZVAL_ZSTRL(&final_name, var_name, var_name_len, key_type, 1);
+                                       ZVAL_ZSTRL(&final_name, var_name, key_type, var_name_len, 1);
                                }
                                break;
                }