]> granicus.if.org Git - php/commitdiff
Make they are in the same style of Z_ISREF
authorXinchen Hui <laruence@gmail.com>
Sat, 3 May 2014 08:06:27 +0000 (16:06 +0800)
committerXinchen Hui <laruence@gmail.com>
Sat, 3 May 2014 08:08:58 +0000 (16:08 +0800)
30 files changed:
Zend/zend_API.h
Zend/zend_interfaces.c
Zend/zend_types.h
ext/dom/php_dom.c
ext/libxml/libxml.c
ext/mbstring/mbstring.c
ext/mbstring/php_mbregex.c
ext/mysql/php_mysql.c
ext/pdo/pdo_dbh.c
ext/pdo/pdo_stmt.c
ext/pdo_sqlite/sqlite_driver.c
ext/reflection/php_reflection.c
ext/session/mod_user.c
ext/session/php_session.h
ext/session/session.c
ext/simplexml/simplexml.c
ext/simplexml/sxe.c
ext/spl/php_spl.c
ext/spl/spl_array.c
ext/spl/spl_directory.c
ext/spl/spl_dllist.c
ext/spl/spl_fixedarray.c
ext/spl/spl_heap.c
ext/spl/spl_iterators.c
ext/spl/spl_observer.c
ext/sqlite3/sqlite3.c
ext/standard/array.c
ext/standard/streamsfuncs.c
ext/xml/xml.c
main/streams/userspace.c

index 54402c411daab9b3c04fa29c0df9947a705d817b..8535c1b88789a73521473e8b20c74be723ca6d15 100644 (file)
@@ -638,7 +638,6 @@ END_EXTERN_C()
 
 #define HASH_OF(p) (Z_TYPE_P(p)==IS_ARRAY ? Z_ARRVAL_P(p) : ((Z_TYPE_P(p)==IS_OBJECT ? Z_OBJ_HT_P(p)->get_properties((p) TSRMLS_CC) : NULL)))
 #define ZVAL_IS_NULL(z) (Z_TYPE_P(z) == IS_NULL)
-#define ZVAL_IS_UNDEF(z) (Z_TYPE_P(z) == IS_UNDEF)
 
 /* For compatibility */
 #define ZEND_MINIT                     ZEND_MODULE_STARTUP_N
index cf8889e0dfcfd25c5ff7958bc68c0b56d4f253da..c6cebd2ed5f973a0d4d00454a646db2000256922 100644 (file)
@@ -138,7 +138,7 @@ ZEND_API void zend_user_it_invalidate_current(zend_object_iterator *_iter TSRMLS
 {
        zend_user_iterator *iter = (zend_user_iterator*)_iter;
 
-       if (!ZVAL_IS_UNDEF(&iter->value)) {
+       if (!Z_ISUNDEF(iter->value)) {
                zval_ptr_dtor(&iter->value);
                ZVAL_UNDEF(&iter->value);
        }
@@ -182,7 +182,7 @@ ZEND_API zval *zend_user_it_get_current_data(zend_object_iterator *_iter TSRMLS_
        zend_user_iterator *iter = (zend_user_iterator*)_iter;
        zval *object = &iter->it.data;
 
-       if (ZVAL_IS_UNDEF(&iter->value)) {
+       if (Z_ISUNDEF(iter->value)) {
                zend_call_method_with_0_params(object, iter->ce, &iter->ce->iterator_funcs.zf_current, "current", &iter->value);
        }       
        return &iter->value;
index 3a339e792f58829893c4dc7b720b2a56524ebf00..3e3cc51b7e7bb4a424c177dc7c51b1501a5abef4 100644 (file)
@@ -371,6 +371,12 @@ static inline zend_uchar zval_get_type(const zval* pz) {
 #define Z_ISREF(zval)                          (Z_TYPE(zval) == IS_REFERENCE)
 #define Z_ISREF_P(zval_p)                      Z_ISREF(*(zval_p))
 
+#define Z_ISUNDEF(zval)                                (Z_TYPE(zval) == IS_UNDEF)
+#define Z_ISUNDEF_P(zval_p)                    Z_ISUNDEF(*(zval_p))
+
+#define Z_ISNULL(zval)                         (Z_TYPE(zval) == IS_NULL)
+#define Z_ISNULL_P(zval_p)                     Z_ISNULL(*(zval_p))
+
 #define Z_LVAL(zval)                           (zval).value.lval
 #define Z_LVAL_P(zval_p)                       Z_LVAL(*(zval_p))
 
index 9f971ee0ace8441f8b1475c5b1900f9922c44358..77bf91920fa3fa3451aaee3fd9687b9c6a2c3b1b 100644 (file)
@@ -1142,7 +1142,7 @@ static void dom_nnodemap_object_dtor(zend_object *object TSRMLS_DC) /* {{{ */
                if (objmap->ns) {
                        xmlFree(objmap->ns);
                }
-               if (!ZVAL_IS_UNDEF(&objmap->baseobj_zv)) {
+               if (!Z_ISUNDEF(objmap->baseobj_zv)) {
                        zval_ptr_dtor(&objmap->baseobj_zv);
                }
                efree(objmap);
index c7efa13c2764d89eba0adb7a5cf91a8991700b57..47bc5caae31a9526705c704529f3149431d24906 100644 (file)
@@ -282,7 +282,7 @@ static void _php_libxml_destroy_fci(zend_fcall_info *fci, zval *object)
                zval_ptr_dtor(&fci->function_name);
                fci->size = 0;
        }
-       if (!ZVAL_IS_UNDEF(object)) {
+       if (!Z_ISUNDEF_P(object)) {
                zval_ptr_dtor(object);
                ZVAL_UNDEF(object);
        }
@@ -337,7 +337,7 @@ static void *php_libxml_streams_IO_open_wrapper(const char *filename, const char
                }
        }
 
-       context = php_stream_context_from_zval(ZVAL_IS_UNDEF(&LIBXML(stream_context))? NULL : &LIBXML(stream_context), 0);
+       context = php_stream_context_from_zval(Z_ISUNDEF(LIBXML(stream_context))? NULL : &LIBXML(stream_context), 0);
        
        ret_val = php_stream_open_wrapper_ex(path_to_open, (char *)mode, REPORT_ERRORS, NULL, context);
        if (isescaped) {
@@ -606,7 +606,7 @@ static xmlParserInputPtr _php_libxml_external_entity_loader(const char *URL,
        fci->no_separation      = 1;
        
        status = zend_call_function(fci, &LIBXML(entity_loader).fcc TSRMLS_CC);
-       if (status != SUCCESS || ZVAL_IS_UNDEF(&retval)) {
+       if (status != SUCCESS || Z_ISUNDEF(retval)) {
                php_libxml_ctx_error(context,
                                "Call to user entity loader callback '%s' has failed",
                                Z_STRVAL(fci->function_name));
@@ -929,7 +929,7 @@ static PHP_FUNCTION(libxml_set_streams_context)
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg) == FAILURE) {
                return;
        }
-       if (!ZVAL_IS_UNDEF(&LIBXML(stream_context))) {
+       if (!Z_ISUNDEF(LIBXML(stream_context))) {
                zval_ptr_dtor(&LIBXML(stream_context));
                ZVAL_UNDEF(&LIBXML(stream_context));
        }
index 741e0e3f0726c99b0320e350adf563a9f86e4861..49990332ae9920651c0a2e621635a7c16f0ad9f0 100644 (file)
@@ -3256,7 +3256,7 @@ PHP_FUNCTION(mb_detect_encoding)
        /* make encoding list */
        list = NULL;
        size = 0;
-       if (ZEND_NUM_ARGS() >= 2 && !ZVAL_IS_NULL(encoding_list)) {
+       if (ZEND_NUM_ARGS() >= 2 && !Z_ISNULL_P(encoding_list)) {
                switch (Z_TYPE_P(encoding_list)) {
                case IS_ARRAY:
                        if (FAILURE == php_mb_parse_encoding_array(encoding_list, &list, &size, 0 TSRMLS_CC)) {
index 223ecffc2aea4efd53ef666d73f11b77fb50f990..c0e61aa660293d91cd525fecc47a96dbf9ddb5a9 100644 (file)
@@ -138,7 +138,7 @@ PHP_RSHUTDOWN_FUNCTION(mb_regex)
 {
        MBREX(current_mbctype) = MBREX(default_mbctype);
 
-       if (!ZVAL_IS_UNDEF(&MBREX(search_str))) {
+       if (!Z_ISUNDEF(MBREX(search_str))) {
                zval_ptr_dtor(&MBREX(search_str));
                ZVAL_UNDEF(&MBREX(search_str));
        }
@@ -970,7 +970,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
                                arg_replace_fci.params = args;
                                arg_replace_fci.retval = &retval;
                                if (zend_call_function(&arg_replace_fci, &arg_replace_fci_cache TSRMLS_CC) == SUCCESS &&
-                                               !ZVAL_IS_UNDEF(&retval)) {
+                                               !Z_ISUNDEF(retval)) {
                                        convert_to_string_ex(&retval);
                                        smart_str_appendl(&out_buf, Z_STRVAL(retval), Z_STRLEN(retval));
                                        if (eval_buf.s) {
@@ -1208,7 +1208,7 @@ _php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAMETERS, int mode)
        pos = MBREX(search_pos);
        str = NULL;
        len = 0;
-       if (!ZVAL_IS_UNDEF(&MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING){
+       if (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING){
                str = (OnigUChar *)Z_STRVAL(MBREX(search_str));
                len = Z_STRLEN(MBREX(search_str));
        }
@@ -1340,7 +1340,7 @@ PHP_FUNCTION(mb_ereg_search_init)
                }
        }
 
-       if (!ZVAL_IS_NULL(&MBREX(search_str))) {
+       if (!Z_ISNULL(MBREX(search_str))) {
                zval_ptr_dtor(&MBREX(search_str));
        }
 
@@ -1404,7 +1404,7 @@ PHP_FUNCTION(mb_ereg_search_setpos)
                return;
        }
 
-       if (position < 0 || (!ZVAL_IS_UNDEF(&MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING && position >= Z_STRLEN(MBREX(search_str)))) {
+       if (position < 0 || (!Z_ISUNDEF(MBREX(search_str)) && Z_TYPE(MBREX(search_str)) == IS_STRING && position >= Z_STRLEN(MBREX(search_str)))) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Position is out of range");
                MBREX(search_pos) = 0;
                RETURN_FALSE;
index 9f7f07d0386dd50d7dbbc083f8ef819913f00de5..0b27f1e44c006a87e81bcd18e254679024e0fd88 100644 (file)
@@ -2209,7 +2209,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type,
                        if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
                                zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Could not execute %s::%s()", ce->name->val, ce->constructor->common.function_name->val);
                        } else {
-                               if (!ZVAL_IS_UNDEF(&retval)) {
+                               if (!Z_ISUNDEF(retval)) {
                                        zval_ptr_dtor(&retval);
                                }
                        }
index d75ae21dcdf90b43521b234060f1c18d2948336d..a9032d0a73ee3052a8067b85812f16abd1dbfb7a 100644 (file)
@@ -157,14 +157,14 @@ PDO_API void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC) /* {{{
                zend_update_property_string(def_ex, &ex, "message", sizeof("message") - 1, message TSRMLS_CC);
                zend_update_property_string(def_ex, &ex, "code", sizeof("code") - 1, *pdo_err TSRMLS_CC);
                
-               if (!ZVAL_IS_UNDEF(&info)) {
+               if (!Z_ISUNDEF(info)) {
                        zend_update_property(pdo_ex, &ex, "errorInfo", sizeof("errorInfo") - 1, &info TSRMLS_CC);
                }
 
                zend_throw_exception_object(&ex TSRMLS_CC);
        }
 
-       if (!ZVAL_IS_UNDEF(&info)) {
+       if (!Z_ISUNDEF(info)) {
                zval_ptr_dtor(&info);
        }
 
@@ -425,7 +425,7 @@ options:
 
 static zval *pdo_stmt_instantiate(pdo_dbh_t *dbh, zval *object, zend_class_entry *dbstmt_ce, zval *ctor_args TSRMLS_DC) /* {{{ */
 {
-       if (!ZVAL_IS_UNDEF(ctor_args)) {
+       if (!Z_ISUNDEF_P(ctor_args)) {
                if (Z_TYPE_P(ctor_args) != IS_ARRAY) {
                        pdo_raise_impl_error(dbh, NULL, "HY000", "constructor arguments must be passed as an array" TSRMLS_CC);
                        return NULL;
@@ -480,7 +480,7 @@ static void pdo_stmt_construct(pdo_stmt_t *stmt, zval *object, zend_class_entry
                if (zend_call_function(&fci, &fcc TSRMLS_CC) == FAILURE) {
                        Z_OBJ_P(object) = NULL;
                        object = NULL; /* marks failure */
-               } else if (!ZVAL_IS_UNDEF(&retval)) {
+               } else if (!Z_ISUNDEF(retval)) {
                        zval_ptr_dtor(&retval);
                }
                        
@@ -803,7 +803,7 @@ static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, long attr, zval *value TSRMLS_D
                                return FAILURE;
                        }
                        dbh->def_stmt_ce = pce;
-                       if (!ZVAL_IS_UNDEF(&dbh->def_stmt_ctor_args)) {
+                       if (!Z_ISUNDEF(dbh->def_stmt_ctor_args)) {
                                zval_ptr_dtor(&dbh->def_stmt_ctor_args);
                                ZVAL_UNDEF(&dbh->def_stmt_ctor_args);
                        }
@@ -902,7 +902,7 @@ static PHP_METHOD(PDO, getAttribute)
                case PDO_ATTR_STATEMENT_CLASS:
                        array_init(return_value);
                        add_next_index_str(return_value, STR_COPY(dbh->def_stmt_ce->name));
-                       if (!ZVAL_IS_UNDEF(&dbh->def_stmt_ctor_args)) {
+                       if (!Z_ISUNDEF(dbh->def_stmt_ctor_args)) {
                                Z_ADDREF(dbh->def_stmt_ctor_args);
                                add_next_index_zval(return_value, &dbh->def_stmt_ctor_args);
                        }
@@ -1518,7 +1518,7 @@ static void dbh_free(pdo_dbh_t *dbh TSRMLS_DC)
                pefree((char *)dbh->persistent_id, dbh->is_persistent);
        }
 
-       if (!ZVAL_IS_UNDEF(&dbh->def_stmt_ctor_args)) {
+       if (!Z_ISUNDEF(dbh->def_stmt_ctor_args)) {
                zval_ptr_dtor(&dbh->def_stmt_ctor_args);
        }
        
index 3fbe29cc762557d8bfa85701cb9e52fe475bbe7d..d6699c5b7617a8bb60dae59b53e8c2be6146c9c8 100644 (file)
@@ -256,7 +256,7 @@ int pdo_stmt_describe_columns(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
 
 static void get_lazy_object(pdo_stmt_t *stmt, zval *return_value TSRMLS_DC) /* {{{ */
 {
-       if (ZVAL_IS_UNDEF(&stmt->lazy_object_ref)) {
+       if (Z_ISUNDEF(stmt->lazy_object_ref)) {
                pdo_row_t *row = ecalloc(1, sizeof(pdo_row_t));
                row->stmt = stmt;
                zend_object_std_init(&row->std, pdo_row_ce TSRMLS_CC);
@@ -282,11 +282,11 @@ static void param_dtor(zval *el) /* {{{ */
                STR_RELEASE(param->name);
        }
 
-       if (!ZVAL_IS_UNDEF(&param->parameter)) {
+       if (!Z_ISUNDEF(param->parameter)) {
                zval_ptr_dtor(&param->parameter);
                ZVAL_UNDEF(&param->parameter);
        }
-       if (!ZVAL_IS_UNDEF(&param->driver_params)) {
+       if (!Z_ISUNDEF(param->driver_params)) {
                zval_ptr_dtor(&param->driver_params);
        }
        efree(param);
@@ -318,7 +318,7 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s
                parameter = Z_REFVAL(param->parameter);
        }
 
-       if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_STR && param->max_value_len <= 0 && !ZVAL_IS_NULL(parameter)) {
+       if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_STR && param->max_value_len <= 0 && !Z_ISNULL_P(parameter)) {
                if (Z_TYPE_P(parameter) == IS_DOUBLE) {
                        char *p;
                        int len = spprintf(&p, 0, "%.*H", (int) EG(precision), Z_DVAL_P(parameter));
@@ -479,7 +479,7 @@ static PHP_METHOD(PDOStatement, execute)
                        ZVAL_COPY(&param.parameter, tmp);
 
                        if (!really_register_bound_param(&param, stmt, 1 TSRMLS_CC)) {
-                               if (!ZVAL_IS_UNDEF(&param.parameter)) {
+                               if (!Z_ISUNDEF(param.parameter)) {
                                        zval_ptr_dtor(&param.parameter);
                                }
                                RETURN_FALSE;
@@ -759,7 +759,7 @@ static int do_fetch_class_prepare(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
                fcc->calling_scope = EG(scope);
                fcc->called_scope = ce;
                return 1;
-       } else if (!ZVAL_IS_UNDEF(&stmt->fetch.cls.ctor_args)) {
+       } else if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args)) {
                pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "user-supplied class does not have a constructor, use NULL for the ctor_params parameter, or simply omit it" TSRMLS_CC);
                return 0;
        } else {
@@ -816,7 +816,7 @@ static int do_fetch_opt_finish(pdo_stmt_t *stmt, int free_ctor_agrs TSRMLS_DC) /
        }
 
        stmt->fetch.cls.fci.size = 0;
-       if (!ZVAL_IS_UNDEF(&stmt->fetch.cls.ctor_args) && free_ctor_agrs) {
+       if (!Z_ISUNDEF(stmt->fetch.cls.ctor_args) && free_ctor_agrs) {
                zval_ptr_dtor(&stmt->fetch.cls.ctor_args);
                ZVAL_UNDEF(&stmt->fetch.cls.ctor_args);
                stmt->fetch.cls.fci.param_count = 0;
@@ -959,7 +959,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_
                                                        pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call class constructor" TSRMLS_CC);
                                                        return 0;
                                                } else {
-                                                       if (!ZVAL_IS_UNDEF(&stmt->fetch.cls.retval)) {
+                                                       if (!Z_ISUNDEF(stmt->fetch.cls.retval)) {
                                                                zval_ptr_dtor(&stmt->fetch.cls.retval);
                                                                ZVAL_UNDEF(&stmt->fetch.cls.retval);
                                                        }
@@ -969,7 +969,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_
                                break;
                        
                        case PDO_FETCH_INTO:
-                               if (ZVAL_IS_UNDEF(&stmt->fetch.into)) {
+                               if (Z_ISUNDEF(stmt->fetch.into)) {
                                        pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch-into object specified." TSRMLS_CC);
                                        return 0;
                                        break;
@@ -983,7 +983,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_
                                break;
 
                        case PDO_FETCH_FUNC:
-                               if (ZVAL_IS_UNDEF(&stmt->fetch.func.function)) {
+                               if (Z_ISUNDEF(stmt->fetch.func.function)) {
                                        pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "No fetch function specified" TSRMLS_CC);
                                        return 0;
                                }
@@ -1156,7 +1156,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_
                                                pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call class constructor" TSRMLS_CC);
                                                return 0;
                                        } else {
-                                               if (!ZVAL_IS_UNDEF(&stmt->fetch.cls.retval)) {
+                                               if (!Z_ISUNDEF(stmt->fetch.cls.retval)) {
                                                        zval_ptr_dtor(&stmt->fetch.cls.retval);
                                                }
                                        }
@@ -1179,7 +1179,7 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value, enum pdo_
                                        if (return_all) {
                                                zval_ptr_dtor(return_value); /* we don't need that */
                                                ZVAL_COPY_VALUE(return_value, &retval);
-                                       } else if (!ZVAL_IS_UNDEF(&retval)) {
+                                       } else if (!Z_ISUNDEF(retval)) {
                                                ZVAL_COPY_VALUE(return_value, &retval);
                                        }
                                }
@@ -1579,7 +1579,7 @@ static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt,
 
        ZVAL_COPY(&param.parameter, parameter);
        if (!really_register_bound_param(&param, stmt, is_param TSRMLS_CC)) {
-               if (!ZVAL_IS_UNDEF(&param.parameter)) {
+               if (!Z_ISUNDEF(param.parameter)) {
                        zval_ptr_dtor(&(param.parameter));
                }
                return 0;
@@ -1617,7 +1617,7 @@ static PHP_METHOD(PDOStatement, bindValue)
        
        ZVAL_COPY(&param.parameter, parameter);
        if (!really_register_bound_param(&param, stmt, TRUE TSRMLS_CC)) {
-               if (!ZVAL_IS_UNDEF(&param.parameter)) {
+               if (!Z_ISUNDEF(param.parameter)) {
                        zval_ptr_dtor(&(param.parameter));
                        ZVAL_UNDEF(&param.parameter);
                }
@@ -1856,7 +1856,7 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in
 
        switch (stmt->default_fetch_type) {
                case PDO_FETCH_INTO:
-                       if (!ZVAL_IS_UNDEF(&stmt->fetch.into)) {
+                       if (!Z_ISUNDEF(stmt->fetch.into)) {
                                zval_ptr_dtor(&stmt->fetch.into);
                                ZVAL_UNDEF(&stmt->fetch.into);
                        }
@@ -2344,13 +2344,13 @@ static void free_statement(pdo_stmt_t *stmt TSRMLS_DC)
                stmt->columns = NULL;
        }
 
-       if (!ZVAL_IS_UNDEF(&stmt->fetch.into) && stmt->default_fetch_type == PDO_FETCH_INTO) {
+       if (!Z_ISUNDEF(stmt->fetch.into) && stmt->default_fetch_type == PDO_FETCH_INTO) {
                ZVAL_UNDEF(&stmt->fetch.into);
        }
        
        do_fetch_opt_finish(stmt, 1 TSRMLS_CC);
 
-       if (!ZVAL_IS_UNDEF(&stmt->database_object_handle)) {
+       if (!Z_ISUNDEF(stmt->database_object_handle)) {
                zval_ptr_dtor(&stmt->database_object_handle);
        }
        zend_object_std_dtor(&stmt->std TSRMLS_CC);
@@ -2390,7 +2390,7 @@ static void pdo_stmt_iter_dtor(zend_object_iterator *iter TSRMLS_DC)
 
        zval_ptr_dtor(&I->iter.data);
                
-       if (!ZVAL_IS_UNDEF(&I->fetch_ahead)) {
+       if (!Z_ISUNDEF(I->fetch_ahead)) {
                zval_ptr_dtor(&I->fetch_ahead);
        }
 }
@@ -2399,7 +2399,7 @@ static int pdo_stmt_iter_valid(zend_object_iterator *iter TSRMLS_DC)
 {
        struct php_pdo_iterator *I = (struct php_pdo_iterator*)iter;
 
-       return ZVAL_IS_UNDEF(&I->fetch_ahead) ? FAILURE : SUCCESS;
+       return Z_ISUNDEF(I->fetch_ahead) ? FAILURE : SUCCESS;
 }
 
 static zval *pdo_stmt_iter_get_data(zend_object_iterator *iter TSRMLS_DC)
@@ -2407,7 +2407,7 @@ static zval *pdo_stmt_iter_get_data(zend_object_iterator *iter TSRMLS_DC)
        struct php_pdo_iterator *I = (struct php_pdo_iterator*)iter;
 
        /* sanity */
-       if (ZVAL_IS_UNDEF(&I->fetch_ahead)) {
+       if (Z_ISUNDEF(I->fetch_ahead)) {
                return NULL;
        }
 
@@ -2430,7 +2430,7 @@ static void pdo_stmt_iter_move_forwards(zend_object_iterator *iter TSRMLS_DC)
        struct php_pdo_iterator *I = (struct php_pdo_iterator*)iter;
        pdo_stmt_t *stmt = Z_PDO_STMT_P(&I->iter.data); /* for PDO_HANDLE_STMT_ERR() */
 
-       if (!ZVAL_IS_UNDEF(&I->fetch_ahead)) {
+       if (!Z_ISUNDEF(I->fetch_ahead)) {
                zval_ptr_dtor(&I->fetch_ahead);
        }
 
index 25a6c7053e3feb633cf3cad78de83ca46f88bb78..ebb16d99206e1e08d6c770836856d6695d379acf 100644 (file)
@@ -118,13 +118,13 @@ static void pdo_sqlite_cleanup_callbacks(pdo_sqlite_db_handle *H TSRMLS_DC)
                }
 
                efree((char*)func->funcname);
-               if (!ZVAL_IS_UNDEF(&func->func)) {
+               if (!Z_ISUNDEF(func->func)) {
                        zval_ptr_dtor(&func->func);
                }
-               if (!ZVAL_IS_UNDEF(&func->step)) {
+               if (!Z_ISUNDEF(func->step)) {
                        zval_ptr_dtor(&func->step);
                }
-               if (!ZVAL_IS_UNDEF(&func->fini)) {
+               if (!Z_ISUNDEF(func->fini)) {
                        zval_ptr_dtor(&func->fini);
                }
                efree(func);
@@ -145,7 +145,7 @@ static void pdo_sqlite_cleanup_callbacks(pdo_sqlite_db_handle *H TSRMLS_DC)
                }
 
                efree((char*)collation->name);
-               if (!ZVAL_IS_UNDEF(&collation->callback)) {
+               if (!Z_ISUNDEF(collation->callback)) {
                        zval_ptr_dtor(&collation->callback);
                }
                efree(collation);
@@ -344,7 +344,7 @@ static int do_callback(struct pdo_sqlite_fci *fc, zval *cb,
                if (!agg_context) {
                        ZVAL_NULL(&zargs[0]);
                } else {
-                       if (ZVAL_IS_UNDEF(&agg_context->val)) {
+                       if (Z_ISUNDEF(agg_context->val)) {
                                GC_REFCOUNT(agg_context) = 1;
                                GC_TYPE_INFO(agg_context) = IS_REFERENCE;
                                ZVAL_NULL(&agg_context->val);
@@ -397,7 +397,7 @@ static int do_callback(struct pdo_sqlite_fci *fc, zval *cb,
        if (!is_agg || !argv) {
                /* only set the sqlite return value if we are a scalar function,
                 * or if we are finalizing an aggregate */
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        switch (Z_TYPE(retval)) {
                                case IS_LONG:
                                        sqlite3_result_int(context, Z_LVAL(retval));
@@ -429,7 +429,7 @@ static int do_callback(struct pdo_sqlite_fci *fc, zval *cb,
                if (agg_context) {
                        zval_ptr_dtor(&agg_context->val);
                }
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        ZVAL_COPY_VALUE(&agg_context->val, &retval);
                        ZVAL_UNDEF(&retval);
                } else {
@@ -437,7 +437,7 @@ static int do_callback(struct pdo_sqlite_fci *fc, zval *cb,
                }
        }
 
-       if (!ZVAL_IS_UNDEF(&retval)) {
+       if (!Z_ISUNDEF(retval)) {
                zval_ptr_dtor(&retval);
        }
 
@@ -495,7 +495,7 @@ static int php_sqlite3_collation_callback(void *context,
 
        if ((ret = zend_call_function(&collation->fc.fci, &collation->fc.fcc TSRMLS_CC)) == FAILURE) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "An error occurred while invoking the callback");
-       } else if (!ZVAL_IS_UNDEF(&retval)) {
+       } else if (!Z_ISUNDEF(retval)) {
                if (Z_TYPE(retval) != IS_LONG) {
                        convert_to_long_ex(&retval);
                }
index f16c39272d190a1ec30c4053b7a11a0b24b2bf16..df4ba16bc4330044e3db07d69c778a6812305bda 100644 (file)
@@ -1686,9 +1686,9 @@ ZEND_METHOD(reflection_function, getClosureThis)
                return;
        }
        GET_REFLECTION_OBJECT();
-       if (!ZVAL_IS_UNDEF(&intern->obj)) {
+       if (!Z_ISUNDEF(intern->obj)) {
                closure_this = zend_get_closure_this_ptr(&intern->obj TSRMLS_CC);
-               if (!ZVAL_IS_UNDEF(closure_this)) {
+               if (!Z_ISUNDEF_P(closure_this)) {
                        RETURN_ZVAL(closure_this, 1, 0);
                }
        }
@@ -1706,7 +1706,7 @@ ZEND_METHOD(reflection_function, getClosureScopeClass)
                return;
        }
        GET_REFLECTION_OBJECT();
-       if (!ZVAL_IS_UNDEF(&intern->obj)) {
+       if (!Z_ISUNDEF(intern->obj)) {
                closure_func = zend_get_closure_method_def(&intern->obj TSRMLS_CC);
                if (closure_func && closure_func->common.scope) {
                        zend_reflection_class_factory(closure_func->common.scope, return_value TSRMLS_CC);
@@ -2047,7 +2047,7 @@ ZEND_METHOD(reflection_function, getParameters)
        for (i = 0; i < fptr->common.num_args; i++) {
                zval parameter;
 
-               reflection_parameter_factory(_copy_function(fptr TSRMLS_CC), ZVAL_IS_UNDEF(&intern->obj)? NULL : &intern->obj, arg_info, i, fptr->common.required_num_args, &parameter TSRMLS_CC);
+               reflection_parameter_factory(_copy_function(fptr TSRMLS_CC), Z_ISUNDEF(intern->obj)? NULL : &intern->obj, arg_info, i, fptr->common.required_num_args, &parameter TSRMLS_CC);
                add_next_index_zval(return_value, &parameter);
 
                arg_info++;
@@ -2326,9 +2326,9 @@ ZEND_METHOD(reflection_parameter, getDeclaringFunction)
        GET_REFLECTION_OBJECT_PTR(param);
 
        if (!param->fptr->common.scope) {
-               reflection_function_factory(_copy_function(param->fptr TSRMLS_CC), ZVAL_IS_UNDEF(&intern->obj)? NULL : &intern->obj, return_value TSRMLS_CC);
+               reflection_function_factory(_copy_function(param->fptr TSRMLS_CC), Z_ISUNDEF(intern->obj)? NULL : &intern->obj, return_value TSRMLS_CC);
        } else {
-               reflection_method_factory(param->fptr->common.scope, _copy_function(param->fptr TSRMLS_CC), ZVAL_IS_UNDEF(&intern->obj)? NULL : &intern->obj, return_value TSRMLS_CC);
+               reflection_method_factory(param->fptr->common.scope, _copy_function(param->fptr TSRMLS_CC), Z_ISUNDEF(intern->obj)? NULL : &intern->obj, return_value TSRMLS_CC);
        }
 }
 /* }}} */
@@ -3681,7 +3681,7 @@ ZEND_METHOD(reflection_class, getMethod)
 
        GET_REFLECTION_OBJECT_PTR(ce);
        lc_name = zend_str_tolower_dup(name, name_len);
-       if (ce == zend_ce_closure && !ZVAL_IS_UNDEF(&intern->obj) && (name_len == sizeof(ZEND_INVOKE_FUNC_NAME)-1)
+       if (ce == zend_ce_closure && !Z_ISUNDEF(intern->obj) && (name_len == sizeof(ZEND_INVOKE_FUNC_NAME)-1)
                && memcmp(lc_name, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1) == 0
                && (mptr = zend_get_closure_invoke_method(Z_OBJ(intern->obj) TSRMLS_CC)) != NULL)
        {
@@ -3689,7 +3689,7 @@ ZEND_METHOD(reflection_class, getMethod)
                   method and not the closure definition itself */
                reflection_method_factory(ce, mptr, NULL, return_value TSRMLS_CC);
                efree(lc_name);
-       } else if (ce == zend_ce_closure && ZVAL_IS_UNDEF(&intern->obj) && (name_len == sizeof(ZEND_INVOKE_FUNC_NAME)-1)
+       } else if (ce == zend_ce_closure && Z_ISUNDEF(intern->obj) && (name_len == sizeof(ZEND_INVOKE_FUNC_NAME)-1)
                && memcmp(lc_name, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1) == 0
                && object_init_ex(&obj_tmp, ce) == SUCCESS && (mptr = zend_get_closure_invoke_method(Z_OBJ(obj_tmp) TSRMLS_CC)) != NULL) {
                /* don't assign closure_object since we only reflect the invoke handler
@@ -4082,7 +4082,7 @@ ZEND_METHOD(reflection_class, isCloneable)
        if (ce->ce_flags & (ZEND_ACC_INTERFACE | ZEND_ACC_TRAIT | ZEND_ACC_EXPLICIT_ABSTRACT_CLASS | ZEND_ACC_IMPLICIT_ABSTRACT_CLASS)) {
                RETURN_FALSE;
        }
-       if (!ZVAL_IS_UNDEF(&intern->obj)) {
+       if (!Z_ISUNDEF(intern->obj)) {
                if (ce->clone) {
                        RETURN_BOOL(ce->clone->common.fn_flags & ZEND_ACC_PUBLIC);
                } else {
index 2b4e79996f6d26cd9c6bc1125fc5db87c497de41..21f52a1db0704626d68162e2ec69fe1a54751c1e 100644 (file)
@@ -53,7 +53,7 @@ static void ps_call_handler(zval *func, int argc, zval *argv, zval *retval TSRML
        if (call_user_function(EG(function_table), NULL, func, retval, argc, argv TSRMLS_CC) == FAILURE) {
                zval_ptr_dtor(retval);
                ZVAL_UNDEF(retval);
-       } else if (ZVAL_IS_UNDEF(retval)) {
+       } else if (Z_ISUNDEF_P(retval)) {
                ZVAL_NULL(retval);
        }
        for (i = 0; i < argc; i++) {
@@ -68,7 +68,7 @@ static void ps_call_handler(zval *func, int argc, zval *argv, zval *retval TSRML
 #define PSF(a) PS(mod_user_names).name.ps_##a
 
 #define FINISH                                                         \
-       if (!ZVAL_IS_UNDEF(&retval)) {                  \
+       if (!Z_ISUNDEF(retval)) {                       \
                convert_to_long(&retval);                       \
                ret = Z_LVAL(retval);                           \
                zval_ptr_dtor(&retval);                         \
@@ -80,7 +80,7 @@ PS_OPEN_FUNC(user)
        zval args[2];
        STDVARS;
        
-       if (ZVAL_IS_UNDEF(&PSF(open))) {
+       if (Z_ISUNDEF(PSF(open))) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING,
                        "user session functions not defined");
                        
@@ -115,7 +115,7 @@ PS_CLOSE_FUNC(user)
        PS(mod_user_implemented) = 0;
 
        if (bailout) {
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        zval_ptr_dtor(&retval);
                }
                zend_bailout();
@@ -133,7 +133,7 @@ PS_READ_FUNC(user)
 
        ps_call_handler(&PSF(read), 1, args, &retval TSRMLS_CC);
 
-       if (!ZVAL_IS_UNDEF(&retval)) {
+       if (!Z_ISUNDEF(retval)) {
                if (Z_TYPE(retval) == IS_STRING) {
                        *val = STR_COPY(Z_STR(retval));
                        ret = SUCCESS;
@@ -184,13 +184,13 @@ PS_GC_FUNC(user)
 PS_CREATE_SID_FUNC(user)
 {
        /* maintain backwards compatibility */
-       if (!ZVAL_IS_UNDEF(&PSF(create_sid))) {
+       if (!Z_ISUNDEF(PSF(create_sid))) {
                zend_string *id = NULL;
                zval retval;
 
                ps_call_handler(&PSF(create_sid), 0, NULL, &retval TSRMLS_CC);
 
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        if (Z_TYPE(retval) == IS_STRING) {
                                id = STR_COPY(Z_STR(retval));
                        }
index 2bf0d858f7608b50fcf38e060f3b7baf37897d76..e6d6342ac72f36d153d688ab13d425bb6c8e1ad4 100644 (file)
@@ -246,7 +246,7 @@ PHPAPI void php_session_reset_id(TSRMLS_D);
 #define PS_ADD_VAR(name) PS_ADD_VARL(name)
 
 #define PS_DEL_VARL(name) do {                                                                         \
-       if (!ZVAL_IS_NULL(&PS(http_session_vars))) {                                    \
+       if (!Z_ISNULL(PS(http_session_vars))) {                                                 \
                zend_hash_del(Z_ARRVAL(PS(http_session_vars)), name);           \
        }                                                                                                                               \
 } while (0)
index f910d0cf3776d220ec1b82dc378ca6351d0b14d9..ea7ca7bb9aeb21a4446127dcf3544efd9cd673ef 100644 (file)
@@ -103,7 +103,7 @@ static inline void php_rinit_session_globals(TSRMLS_D) /* {{{ */
 /* Dispatched by RSHUTDOWN and by php_session_destroy */
 static inline void php_rshutdown_session_globals(TSRMLS_D) /* {{{ */
 {
-       if (!ZVAL_IS_UNDEF(&PS(http_session_vars))) {
+       if (!Z_ISUNDEF(PS(http_session_vars))) {
                zval_ptr_dtor(&PS(http_session_vars));
                ZVAL_UNDEF(&PS(http_session_vars));
        }
@@ -184,7 +184,7 @@ static void php_session_track_init(TSRMLS_D) /* {{{ */
        /* Unconditionally destroy existing array -- possible dirty data */
        zend_delete_global_variable(var_name TSRMLS_CC);
 
-       if (!ZVAL_IS_UNDEF(&PS(http_session_vars))) {
+       if (!Z_ISUNDEF(PS(http_session_vars))) {
                zval_ptr_dtor(&PS(http_session_vars));
        }
 
@@ -850,7 +850,7 @@ PS_SERIALIZER_DECODE_FUNC(php_serialize) /* {{{ */
        PHP_VAR_UNSERIALIZE_INIT(var_hash);
        php_var_unserialize(&session_vars, (const unsigned char**)&val, endptr, &var_hash TSRMLS_CC);
        PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
-       if (!ZVAL_IS_UNDEF(&PS(http_session_vars))) {
+       if (!Z_ISUNDEF(PS(http_session_vars))) {
                zval_ptr_dtor(&PS(http_session_vars));
        }
        if (Z_TYPE(session_vars) == IS_NULL) {
@@ -1538,7 +1538,7 @@ PHPAPI void php_session_start(TSRMLS_D) /* {{{ */
         * '<session-name>=<session-id>' to allow URLs of the form
         * http://yoursite/<session-name>=<session-id>/script.php */
 
-       if (!PS(use_only_cookies) && !PS(id) && !ZVAL_IS_UNDEF(&PG(http_globals)[TRACK_VARS_SERVER]) &&
+       if (!PS(use_only_cookies) && !PS(id) && !Z_ISUNDEF(PG(http_globals)[TRACK_VARS_SERVER]) &&
                        (data = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]), "REQUEST_URI", sizeof("REQUEST_URI") - 1)) &&
                        Z_TYPE_P(data) == IS_STRING &&
                        (p = strstr(Z_STRVAL_P(data), PS(session_name))) &&
@@ -1558,7 +1558,7 @@ PHPAPI void php_session_start(TSRMLS_D) /* {{{ */
 
        if (PS(id) &&
                        PS(extern_referer_chk)[0] != '\0' &&
-                       !ZVAL_IS_UNDEF(&PG(http_globals)[TRACK_VARS_SERVER]) &&
+                       !Z_ISUNDEF(PG(http_globals)[TRACK_VARS_SERVER]) &&
                        (data = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_REFERER", sizeof("HTTP_REFERER") - 1)) &&
                        Z_TYPE_P(data) == IS_STRING &&
                        Z_STRLEN_P(data) != 0 &&
@@ -1795,7 +1795,7 @@ static PHP_FUNCTION(session_set_save_handler)
                        zend_hash_get_current_key_ex(&php_session_iface_entry->function_table, &func_name, &func_index, 0, &pos);
 
                        if ((current_mptr = zend_hash_find_ptr(&Z_OBJCE_P(obj)->function_table, func_name))) {
-                               if (!ZVAL_IS_UNDEF(&PS(mod_user_names).names[i])) {
+                               if (!Z_ISUNDEF(PS(mod_user_names).names[i])) {
                                        zval_ptr_dtor(&PS(mod_user_names).names[i]);
                                }
 
@@ -1818,7 +1818,7 @@ static PHP_FUNCTION(session_set_save_handler)
                        zend_hash_get_current_key_ex(&php_session_id_iface_entry->function_table, &func_name, &func_index, 0, &pos);
 
                        if ((current_mptr = zend_hash_find_ptr(&Z_OBJCE_P(obj)->function_table, func_name))) {
-                               if (!ZVAL_IS_UNDEF(&PS(mod_user_names).names[i])) {
+                               if (!Z_ISUNDEF(PS(mod_user_names).names[i])) {
                                        zval_ptr_dtor(&PS(mod_user_names).names[i]);
                                }
 
@@ -1888,7 +1888,7 @@ static PHP_FUNCTION(session_set_save_handler)
        }
 
        for (i = 0; i < argc; i++) {
-               if (!ZVAL_IS_UNDEF(&PS(mod_user_names).names[i])) {
+               if (!Z_ISUNDEF(PS(mod_user_names).names[i])) {
                        zval_ptr_dtor(&PS(mod_user_names).names[i]);
                }
                ZVAL_COPY(&PS(mod_user_names).names[i], &args[i]);
@@ -2398,7 +2398,7 @@ static PHP_RSHUTDOWN_FUNCTION(session) /* {{{ */
 
        /* this should NOT be done in php_rshutdown_session_globals() */
        for (i = 0; i < 7; i++) {
-               if (!ZVAL_IS_UNDEF(&PS(mod_user_names).names[i])) {
+               if (!Z_ISUNDEF(PS(mod_user_names).names[i])) {
                        zval_ptr_dtor(&PS(mod_user_names).names[i]);
                        ZVAL_UNDEF(&PS(mod_user_names).names[i]);
                }
@@ -2554,7 +2554,7 @@ static zend_bool early_find_sid_in(zval *dest, int where, php_session_rfc1867_pr
 {
        zval *ppid;
 
-       if (ZVAL_IS_UNDEF(&PG(http_globals)[where])) {
+       if (Z_ISUNDEF(PG(http_globals)[where])) {
                return 0;
        }
 
@@ -2708,7 +2708,7 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo
                        }
                        
                        /* First FILE_START event, initializing data */
-                       if (ZVAL_IS_UNDEF(&progress->data)) {
+                       if (Z_ISUNDEF(progress->data)) {
 
                                if (PS(rfc1867_freq) >= 0) {
                                        progress->update_step = PS(rfc1867_freq);
@@ -2801,7 +2801,7 @@ static int php_session_rfc1867_callback(unsigned int event, void *event_data, vo
                                php_rshutdown_session_globals(TSRMLS_C);
                        }
 
-                       if (!ZVAL_IS_UNDEF(&progress->data)) {
+                       if (!Z_ISUNDEF(progress->data)) {
                                zval_ptr_dtor(&progress->data);
                        }
                        zval_ptr_dtor(&progress->sid);
index 403b7afc4e1ab18184d6b6016526d62f0ef5fe68..9e04b592b7020981da53f2b844fda28672be221a 100644 (file)
@@ -113,7 +113,7 @@ static xmlNodePtr php_sxe_get_first_node(php_sxe_object *sxe, xmlNodePtr node TS
 
        if (sxe && sxe->iter.type != SXE_ITER_NONE) {
                php_sxe_reset_iterator(sxe, 1 TSRMLS_CC);
-               if (!ZVAL_IS_UNDEF(&sxe->iter.data)) {
+               if (!Z_ISUNDEF(sxe->iter.data)) {
                        intern = Z_SXEOBJ_P(&sxe->iter.data);
                        GET_NODE(intern, retnode)
                }
@@ -372,7 +372,7 @@ static zval *sxe_prop_dim_read(zval *object, zval *member, zend_bool elements, z
                zval_dtor(&tmp_zv);
        }
 
-       if (ZVAL_IS_UNDEF(rv)) {
+       if (Z_ISUNDEF_P(rv)) {
                ZVAL_COPY_VALUE(rv, &EG(uninitialized_zval));
        }
 
@@ -708,7 +708,7 @@ static zval *sxe_property_get_adr(zval *object, zval *member, int fetch_type, ze
        _node_as_zval(sxe, node, &ret, type, name, sxe->iter.nsprefix, sxe->iter.isprefix TSRMLS_CC);
 
        sxe = Z_SXEOBJ_P(&ret);
-       if (!ZVAL_IS_UNDEF(&sxe->tmp)) {
+       if (!Z_ISUNDEF(sxe->tmp)) {
                zval_ptr_dtor(&sxe->tmp);
        }
 
@@ -1089,7 +1089,7 @@ static HashTable *sxe_get_prop_hash(zval *object, int is_debug TSRMLS_DC) /* {{{
                                if ((!test || !xmlStrcmp(attr->name, sxe->iter.name)) && match_ns(sxe, (xmlNodePtr)attr, sxe->iter.nsprefix, sxe->iter.isprefix)) {
                                        ZVAL_STR(&value, sxe_xmlNodeListGetString((xmlDocPtr) sxe->document->ptr, attr->children, 1 TSRMLS_CC));
                                        namelen = xmlStrlen(attr->name);
-                                       if (ZVAL_IS_UNDEF(&zattr)) {
+                                       if (Z_ISUNDEF(zattr)) {
                                                array_init(&zattr);
                                                sxe_properties_add(rv, "@attributes", sizeof("@attributes") - 1, &zattr TSRMLS_CC);
                                        }
@@ -1165,7 +1165,7 @@ next_iter:
        }
 
        if (use_iter) {
-               if (!ZVAL_IS_UNDEF(&sxe->iter.data)) {
+               if (!Z_ISUNDEF(sxe->iter.data)) {
                        zval_ptr_dtor(&sxe->iter.data);
                }
                ZVAL_COPY_VALUE(&sxe->iter.data, &iter_data);
@@ -1859,7 +1859,7 @@ static int php_sxe_count_elements_helper(php_sxe_object *sxe, long *count TSRMLS
                node = php_sxe_iterator_fetch(sxe, node->next, 0 TSRMLS_CC);
        }
 
-       if (!ZVAL_IS_UNDEF(&sxe->iter.data)) {
+       if (!Z_ISUNDEF(sxe->iter.data)) {
                zval_ptr_dtor(&sxe->iter.data);
        }
        ZVAL_COPY_VALUE(&sxe->iter.data, &data);
@@ -1875,8 +1875,8 @@ static int sxe_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */
        if (intern->fptr_count) {
                zval rv;
                zend_call_method_with_0_params(object, intern->zo.ce, &intern->fptr_count, "count", &rv);
-               if (!ZVAL_IS_UNDEF(&rv)) {
-                       if (!ZVAL_IS_UNDEF(&intern->tmp)) {
+               if (!Z_ISUNDEF(rv)) {
+                       if (!Z_ISUNDEF(intern->tmp)) {
                                zval_ptr_dtor(&intern->tmp);
                        }
                        ZVAL_ZVAL(&intern->tmp, &rv, 0, 0);
@@ -1991,7 +1991,7 @@ static void sxe_object_dtor(zend_object *object TSRMLS_DC)
 
        sxe = php_sxe_fetch_object(object);
 
-       if (!ZVAL_IS_UNDEF(&sxe->iter.data)) {
+       if (!Z_ISUNDEF(sxe->iter.data)) {
                zval_ptr_dtor(&sxe->iter.data);
                ZVAL_UNDEF(&sxe->iter.data);
        }
@@ -2004,7 +2004,7 @@ static void sxe_object_dtor(zend_object *object TSRMLS_DC)
                xmlFree(sxe->iter.nsprefix);
                sxe->iter.nsprefix = NULL;
        }
-       if (!ZVAL_IS_UNDEF(&sxe->tmp)) {
+       if (!Z_ISUNDEF(sxe->tmp)) {
                zval_ptr_dtor(&sxe->tmp);
                ZVAL_UNDEF(&sxe->tmp);
        }
@@ -2238,7 +2238,7 @@ static xmlNodePtr php_sxe_reset_iterator(php_sxe_object *sxe, int use_data TSRML
 {
        xmlNodePtr node;
 
-       if (!ZVAL_IS_UNDEF(&sxe->iter.data)) {
+       if (!Z_ISUNDEF(sxe->iter.data)) {
                zval_ptr_dtor(&sxe->iter.data);
                ZVAL_UNDEF(&sxe->iter.data);
        }
@@ -2284,7 +2284,7 @@ static void php_sxe_iterator_dtor(zend_object_iterator *iter TSRMLS_DC) /* {{{ *
        php_sxe_iterator *iterator = (php_sxe_iterator *)iter;
 
        /* cleanup handled in sxe_object_dtor as we dont always have an iterator wrapper */
-       if (!ZVAL_IS_UNDEF(&iterator->intern.data)) {
+       if (!Z_ISUNDEF(iterator->intern.data)) {
                zval_ptr_dtor(&iterator->intern.data);
        }
 }
@@ -2294,7 +2294,7 @@ static int php_sxe_iterator_valid(zend_object_iterator *iter TSRMLS_DC) /* {{{ *
 {
        php_sxe_iterator *iterator = (php_sxe_iterator *)iter;
 
-       return ZVAL_IS_UNDEF(&iterator->sxe->iter.data) ? FAILURE : SUCCESS;
+       return Z_ISUNDEF(iterator->sxe->iter.data) ? FAILURE : SUCCESS;
 }
 /* }}} */
 
@@ -2330,7 +2330,7 @@ PHP_SXE_API void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC) /*
        xmlNodePtr      node = NULL;
        php_sxe_object  *intern;
 
-       if (!ZVAL_IS_UNDEF(&sxe->iter.data)) {
+       if (!Z_ISUNDEF(sxe->iter.data)) {
                intern = Z_SXEOBJ_P(&sxe->iter.data);
                GET_NODE(intern, node)
                zval_ptr_dtor(&sxe->iter.data);
index c88cbfbe93099abe8df2f2010e9bc6e7427cdf22..e237d2fb95256948e37b5c86d7fdcf23e2dd4d15 100644 (file)
@@ -61,7 +61,7 @@ PHP_METHOD(ce_SimpleXMLIterator, valid)
                return;
        }
 
-       RETURN_BOOL(!ZVAL_IS_UNDEF(&sxe->iter.data));
+       RETURN_BOOL(!Z_ISUNDEF(sxe->iter.data));
 }
 /* }}} */
 
@@ -75,7 +75,7 @@ PHP_METHOD(ce_SimpleXMLIterator, current)
                return;
        }
 
-       if (ZVAL_IS_UNDEF(&sxe->iter.data)) {
+       if (Z_ISUNDEF(sxe->iter.data)) {
                return; /* return NULL */
        }
 
@@ -95,7 +95,7 @@ PHP_METHOD(ce_SimpleXMLIterator, key)
                return;
        }
 
-       if (ZVAL_IS_UNDEF(&sxe->iter.data)) {
+       if (Z_ISUNDEF(sxe->iter.data)) {
                RETURN_FALSE;
        }
 
@@ -136,7 +136,7 @@ PHP_METHOD(ce_SimpleXMLIterator, hasChildren)
                return;
        }
 
-       if (ZVAL_IS_UNDEF(&sxe->iter.data) || sxe->iter.type == SXE_ITER_ATTRLIST) {
+       if (Z_ISUNDEF(sxe->iter.data) || sxe->iter.type == SXE_ITER_ATTRLIST) {
                RETURN_FALSE;
        }
        child = Z_SXEOBJ_P(&sxe->iter.data);
@@ -162,7 +162,7 @@ PHP_METHOD(ce_SimpleXMLIterator, getChildren)
                return;
        }
 
-       if (ZVAL_IS_UNDEF(&sxe->iter.data) || sxe->iter.type == SXE_ITER_ATTRLIST) {
+       if (Z_ISUNDEF(sxe->iter.data) || sxe->iter.type == SXE_ITER_ATTRLIST) {
                return; /* return NULL */
        }
        RETURN_ZVAL(&sxe->iter.data, 1, 0);
index 30ecf67824f23dc03a612e48bd9f069529989187..22e2a0c67192e75401b96649940a634bf80149ba 100644 (file)
@@ -400,10 +400,10 @@ typedef struct {
 static void autoload_func_info_dtor(zval *element)
 {
        autoload_func_info *alfi = (autoload_func_info*)Z_PTR_P(element);
-       if (!ZVAL_IS_UNDEF(&alfi->obj)) {
+       if (!Z_ISUNDEF(alfi->obj)) {
                zval_ptr_dtor(&alfi->obj);
        }
-       if (!ZVAL_IS_UNDEF(&alfi->closure)) {
+       if (!Z_ISUNDEF(alfi->closure)) {
                zval_ptr_dtor(&alfi->closure);
        }
        efree(alfi);
@@ -432,7 +432,7 @@ PHP_FUNCTION(spl_autoload_call)
                while (zend_hash_has_more_elements_ex(SPL_G(autoload_functions), &function_pos) == SUCCESS) {
                        zend_hash_get_current_key_ex(SPL_G(autoload_functions), &func_name, &dummy, 0, &function_pos);
                        alfi = zend_hash_get_current_data_ptr_ex(SPL_G(autoload_functions), &function_pos);
-                       zend_call_method(ZVAL_IS_UNDEF(&alfi->obj)? NULL : &alfi->obj, alfi->ce, &alfi->func_ptr, func_name->val, func_name->len, retval, 1, class_name, NULL TSRMLS_CC);
+                       zend_call_method(Z_ISUNDEF(alfi->obj)? NULL : &alfi->obj, alfi->ce, &alfi->func_ptr, func_name->val, func_name->len, retval, 1, class_name, NULL TSRMLS_CC);
                        zend_exception_save(TSRMLS_C);
                        if (retval) {
                                zval_ptr_dtor(retval);
@@ -568,7 +568,7 @@ PHP_FUNCTION(spl_autoload_register)
                STR_RELEASE(func_name);
 
                if (SPL_G(autoload_functions) && zend_hash_exists(SPL_G(autoload_functions), lc_name)) {
-                       if (!ZVAL_IS_UNDEF(&alfi.closure)) {
+                       if (!Z_ISUNDEF(alfi.closure)) {
                                Z_DELREF_P(&alfi.closure);
                        }
                        goto skip;
@@ -611,7 +611,7 @@ PHP_FUNCTION(spl_autoload_register)
                        if (obj_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) {
                                Z_DELREF(alfi.obj);
                        }                               
-                       if (!ZVAL_IS_UNDEF(&alfi.closure)) {
+                       if (!Z_ISUNDEF(alfi.closure)) {
                                Z_DELREF(alfi.closure);
                        }
                }
@@ -735,14 +735,14 @@ PHP_FUNCTION(spl_autoload_functions)
                zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), &function_pos);
                while (zend_hash_has_more_elements_ex(SPL_G(autoload_functions), &function_pos) == SUCCESS) {
                        alfi = zend_hash_get_current_data_ptr_ex(SPL_G(autoload_functions), &function_pos);
-                       if (!ZVAL_IS_UNDEF(&alfi->closure)) {
+                       if (!Z_ISUNDEF(alfi->closure)) {
                                Z_ADDREF(alfi->closure);
                                add_next_index_zval(return_value, &alfi->closure);
                        } else if (alfi->func_ptr->common.scope) {
                                zval tmp;
 
                                array_init(&tmp);
-                               if (!ZVAL_IS_UNDEF(&alfi->obj)) {
+                               if (!Z_ISUNDEF(alfi->obj)) {
                                        Z_ADDREF(alfi->obj);
                                        add_next_index_zval(&tmp, &alfi->obj);
                                } else {
index 67b4f886c67e8c9b212e87e10d22dd8be793b654..f83004428ee0800e0a515aaeb2023d18633bd9c0 100644 (file)
@@ -305,7 +305,7 @@ static zval *spl_array_get_dimension_ptr(int check_inherited, zval *object, zval
        spl_array_object *intern = Z_SPLARRAY_P(object);
        HashTable *ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
 
-       if (!offset || ZVAL_IS_UNDEF(offset)) {
+       if (!offset || Z_ISUNDEF_P(offset)) {
                return &EG(uninitialized_zval);
        }
 
@@ -416,7 +416,7 @@ static zval *spl_array_read_dimension_ex(int check_inherited, zval *object, zval
                        }
                        zend_call_method_with_1_params(object, Z_OBJCE_P(object), &intern->fptr_offset_get, "offsetGet", &rv, offset);
                        zval_ptr_dtor(offset);
-                       if (!ZVAL_IS_UNDEF(&rv)) {
+                       if (!Z_ISUNDEF(rv)) {
                                zval_ptr_dtor(&intern->retval);
                                ZVAL_ZVAL(&intern->retval, &rv, 0, 0);
                                return &intern->retval;
@@ -636,7 +636,7 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
                zend_call_method_with_1_params(object, Z_OBJCE_P(object), &intern->fptr_offset_has, "offsetExists", &rv, offset);
                zval_ptr_dtor(offset);
 
-               if (!ZVAL_IS_UNDEF(&rv) && zend_is_true(&rv TSRMLS_CC)) {
+               if (!Z_ISUNDEF(rv) && zend_is_true(&rv TSRMLS_CC)) {
                        zval_ptr_dtor(&rv);
                        if (check_empty == 2) {
                                return 1;
@@ -792,7 +792,7 @@ void spl_array_iterator_append(zval *object, zval *append_value TSRMLS_DC) /* {{
 
        spl_array_write_dimension(object, NULL, append_value TSRMLS_CC);
        if (intern->pos == INVALID_IDX) {
-               if (aht->nNumUsed && !ZVAL_IS_UNDEF(&aht->arData[aht->nNumUsed-1].val)) {
+               if (aht->nNumUsed && !Z_ISUNDEF(aht->arData[aht->nNumUsed-1].val)) {
                        spl_array_set_pos(intern, aht, aht->nNumUsed - 1);
                }
        }
@@ -1519,7 +1519,7 @@ static void spl_array_method(INTERNAL_FUNCTION_PARAMETERS, char *fname, int fnam
                efree(Z_ARR_P(Z_REFVAL(tmp)));
                efree(Z_REF(tmp));
        }
-       if (!ZVAL_IS_UNDEF(&retval)) {
+       if (!Z_ISUNDEF(retval)) {
                ZVAL_COPY_VALUE(return_value, &retval);
        }
 } /* }}} */
index 07d3d83b8e854925af9be99c36e839b86935e638..8cc7ec0b6dc7425dff5a7ccd40da793973a9675f 100644 (file)
@@ -66,7 +66,7 @@ static void spl_filesystem_file_free_line(spl_filesystem_object *intern TSRMLS_D
                efree(intern->u.file.current_line);
                intern->u.file.current_line = NULL;
        }
-       if (!ZVAL_IS_UNDEF(&intern->u.file.current_zval)) {
+       if (!Z_ISUNDEF(intern->u.file.current_zval)) {
                zval_ptr_dtor(&intern->u.file.current_zval);
                ZVAL_UNDEF(&intern->u.file.current_zval);
        }
@@ -828,7 +828,7 @@ SPL_METHOD(DirectoryIterator, seek)
        while (intern->u.dir.index < pos) {
                int valid = 0;
                zend_call_method_with_0_params(&EG(This), Z_OBJCE(EG(This)), &intern->u.dir.func_valid, "valid", &retval);
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        valid = zend_is_true(&retval TSRMLS_CC);
                        zval_ptr_dtor(&retval);
                }
@@ -1652,7 +1652,7 @@ static void spl_filesystem_dir_it_dtor(zend_object_iterator *iter TSRMLS_DC)
 {
        spl_filesystem_iterator *iterator = (spl_filesystem_iterator *)iter;
 
-       if (!ZVAL_IS_UNDEF(&iterator->intern.data)) {
+       if (!Z_ISUNDEF(iterator->intern.data)) {
                zval *object = &iterator->intern.data;
                zval_ptr_dtor(object);
        }
@@ -1723,11 +1723,11 @@ static void spl_filesystem_tree_it_dtor(zend_object_iterator *iter TSRMLS_DC)
 {
        spl_filesystem_iterator *iterator = (spl_filesystem_iterator *)iter;
 
-       if (!ZVAL_IS_UNDEF(&iterator->intern.data)) {
+       if (!Z_ISUNDEF(iterator->intern.data)) {
                zval *object = &iterator->intern.data;
                zval_ptr_dtor(object);
        } else {
-               if (!ZVAL_IS_UNDEF(&iterator->current)) {
+               if (!Z_ISUNDEF(iterator->current)) {
                        zval_ptr_dtor(&iterator->current);
                        ZVAL_UNDEF(&iterator->current);
                }
@@ -1742,13 +1742,13 @@ static zval *spl_filesystem_tree_it_current_data(zend_object_iterator *iter TSRM
        spl_filesystem_object   *object   = spl_filesystem_iterator_to_object(iterator TSRMLS_CC);
 
        if (SPL_FILE_DIR_CURRENT(object, SPL_FILE_DIR_CURRENT_AS_PATHNAME)) {
-               if (ZVAL_IS_UNDEF(&iterator->current)) {
+               if (Z_ISUNDEF(iterator->current)) {
                        spl_filesystem_object_get_file_name(object TSRMLS_CC);
                        ZVAL_STRINGL(&iterator->current, object->file_name, object->file_name_len);
                }
                return &iterator->current;
        } else if (SPL_FILE_DIR_CURRENT(object, SPL_FILE_DIR_CURRENT_AS_FILEINFO)) {
-               if (ZVAL_IS_UNDEF(&iterator->current)) {
+               if (Z_ISUNDEF(iterator->current)) {
                        spl_filesystem_object_get_file_name(object TSRMLS_CC);
                        spl_filesystem_object_create_type(0, object, SPL_FS_INFO, NULL, &iterator->current TSRMLS_CC);
                }
@@ -1787,7 +1787,7 @@ static void spl_filesystem_tree_it_move_forward(zend_object_iterator *iter TSRML
                efree(object->file_name);
                object->file_name = NULL;
        }
-       if (!ZVAL_IS_UNDEF(&iterator->current)) {
+       if (!Z_ISUNDEF(iterator->current)) {
                zval_ptr_dtor(&iterator->current);
                ZVAL_UNDEF(&iterator->current);
        }
@@ -1807,7 +1807,7 @@ static void spl_filesystem_tree_it_rewind(zend_object_iterator *iter TSRMLS_DC)
        do {
                spl_filesystem_dir_read(object TSRMLS_CC);
        } while (spl_filesystem_is_dot(object->u.dir.entry.d_name));
-       if (!ZVAL_IS_UNDEF(&iterator->current)) {
+       if (!Z_ISUNDEF(iterator->current)) {
                zval_ptr_dtor(&iterator->current);
                ZVAL_UNDEF(&iterator->current);
        }
@@ -2023,7 +2023,7 @@ static int spl_filesystem_file_read(spl_filesystem_object *intern, int silent TS
 {
        char *buf;
        size_t line_len = 0;
-       long line_add = (intern->u.file.current_line || !ZVAL_IS_UNDEF(&intern->u.file.current_zval)) ? 1 : 0;
+       long line_add = (intern->u.file.current_line || !Z_ISUNDEF(intern->u.file.current_zval)) ? 1 : 0;
 
        spl_filesystem_file_free_line(intern TSRMLS_CC);
        
@@ -2099,7 +2099,7 @@ static int spl_filesystem_file_call(spl_filesystem_object *intern, zend_function
 
        result = zend_call_function(&fci, &fcic TSRMLS_CC);
        
-       if (result == FAILURE || ZVAL_IS_UNDEF(&retval)) {
+       if (result == FAILURE || Z_ISUNDEF(retval)) {
                RETVAL_FALSE;
        } else {
                ZVAL_ZVAL(return_value, &retval, 0, 0);
@@ -2132,7 +2132,7 @@ static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char deli
                size_t buf_len = intern->u.file.current_line_len;
                char *buf = estrndup(intern->u.file.current_line, buf_len);
 
-               if (!ZVAL_IS_UNDEF(&intern->u.file.current_zval)) {
+               if (!Z_ISUNDEF(intern->u.file.current_zval)) {
                        zval_ptr_dtor(&intern->u.file.current_zval);
                        ZVAL_UNDEF(&intern->u.file.current_zval);
                }
@@ -2167,8 +2167,8 @@ static int spl_filesystem_file_read_line_ex(zval * this_ptr, spl_filesystem_obje
                } else {
                        zend_call_method_with_0_params(this_ptr, Z_OBJCE_P(getThis()), &intern->u.file.func_getCurr, "getCurrentLine", &retval);
                }
-               if (!ZVAL_IS_UNDEF(&retval)) {
-                       if (intern->u.file.current_line || !ZVAL_IS_UNDEF(&intern->u.file.current_zval)) {
+               if (!Z_ISUNDEF(retval)) {
+                       if (intern->u.file.current_line || !Z_ISUNDEF(intern->u.file.current_zval)) {
                                intern->u.file.current_line_num++;
                        }
                        spl_filesystem_file_free_line(intern TSRMLS_CC);
@@ -2192,7 +2192,7 @@ static int spl_filesystem_file_is_empty_line(spl_filesystem_object *intern TSRML
 {
        if (intern->u.file.current_line) {
                return intern->u.file.current_line_len == 0;
-       } else if (!ZVAL_IS_UNDEF(&intern->u.file.current_zval)) {
+       } else if (!Z_ISUNDEF(intern->u.file.current_zval)) {
                switch(Z_TYPE(intern->u.file.current_zval)) {
                        case IS_STRING:
                                return Z_STRLEN(intern->u.file.current_zval) == 0;
@@ -2202,7 +2202,7 @@ static int spl_filesystem_file_is_empty_line(spl_filesystem_object *intern TSRML
                                        uint idx = 0;
                                        zval *first;
 
-                                       while (ZVAL_IS_UNDEF(&Z_ARRVAL(intern->u.file.current_zval)->arData[idx].val)) {
+                                       while (Z_ISUNDEF(Z_ARRVAL(intern->u.file.current_zval)->arData[idx].val)) {
                                                idx++;
                                        }
                                        first = &Z_ARRVAL(intern->u.file.current_zval)->arData[idx].val;
@@ -2380,7 +2380,7 @@ SPL_METHOD(SplFileObject, valid)
        }
 
        if (SPL_HAS_FLAG(intern->flags, SPL_FILE_OBJECT_READ_AHEAD)) {
-               RETURN_BOOL(intern->u.file.current_line || !ZVAL_IS_UNDEF(&intern->u.file.current_zval));
+               RETURN_BOOL(intern->u.file.current_line || !Z_ISUNDEF(intern->u.file.current_zval));
        } else {
                RETVAL_BOOL(!php_stream_eof(intern->u.file.stream));
        }
@@ -2412,12 +2412,12 @@ SPL_METHOD(SplFileObject, current)
                return;
        }
 
-       if (!intern->u.file.current_line && ZVAL_IS_UNDEF(&intern->u.file.current_zval)) {
+       if (!intern->u.file.current_line && Z_ISUNDEF(intern->u.file.current_zval)) {
                spl_filesystem_file_read_line(getThis(), intern, 1 TSRMLS_CC);
        }
-       if (intern->u.file.current_line && (!SPL_HAS_FLAG(intern->flags, SPL_FILE_OBJECT_READ_CSV) || ZVAL_IS_UNDEF(&intern->u.file.current_zval))) {
+       if (intern->u.file.current_line && (!SPL_HAS_FLAG(intern->flags, SPL_FILE_OBJECT_READ_CSV) || Z_ISUNDEF(intern->u.file.current_zval))) {
                RETURN_STRINGL(intern->u.file.current_line, intern->u.file.current_line_len);
-       } else if (!ZVAL_IS_UNDEF(&intern->u.file.current_zval)) {
+       } else if (!Z_ISUNDEF(intern->u.file.current_zval)) {
                RETURN_ZVAL(&intern->u.file.current_zval, 1, 0);
        }
        RETURN_FALSE;
index d2f17452ac9efdb6bbe4a86bd23dc6568f6ee18a..cc357bc6be44defec386b48b99faa05f6012b080 100644 (file)
@@ -117,7 +117,7 @@ static inline spl_dllist_object *spl_dllist_from_obj(zend_object *obj) /* {{{ */
 
 /* {{{  spl_ptr_llist */
 static void spl_ptr_llist_zval_dtor(spl_ptr_llist_element *elem TSRMLS_DC) { /* {{{ */
-       if (!ZVAL_IS_UNDEF(&elem->data)) {
+       if (!Z_ISUNDEF(elem->data)) {
                zval_ptr_dtor(&elem->data);
                ZVAL_UNDEF(&elem->data);
        }
@@ -483,7 +483,7 @@ static int spl_dllist_object_count_elements(zval *object, long *count TSRMLS_DC)
        if (intern->fptr_count) {
                zval rv;
                zend_call_method_with_0_params(object, intern->std.ce, &intern->fptr_count, "count", &rv);
-               if (!ZVAL_IS_UNDEF(&rv)) {
+               if (!Z_ISUNDEF(rv)) {
                        zval_ptr_dtor(&intern->retval);
                        ZVAL_ZVAL(&intern->retval, &rv, 0, 0);
                        convert_to_long(&intern->retval);
@@ -602,7 +602,7 @@ SPL_METHOD(SplDoublyLinkedList, pop)
        intern = Z_SPLDLLIST_P(getThis());
        spl_ptr_llist_pop(intern->llist, return_value TSRMLS_CC);
 
-       if (ZVAL_IS_UNDEF(return_value)) {
+       if (Z_ISUNDEF_P(return_value)) {
                zend_throw_exception(spl_ce_RuntimeException, "Can't pop from an empty datastructure", 0 TSRMLS_CC);
                RETURN_NULL();
        }
@@ -622,7 +622,7 @@ SPL_METHOD(SplDoublyLinkedList, shift)
        intern = Z_SPLDLLIST_P(getThis());
        spl_ptr_llist_shift(intern->llist, return_value TSRMLS_CC);
 
-       if (ZVAL_IS_UNDEF(return_value)) {
+       if (Z_ISUNDEF_P(return_value)) {
                zend_throw_exception(spl_ce_RuntimeException, "Can't shift from an empty datastructure", 0 TSRMLS_CC);
                RETURN_NULL();
        }
@@ -643,7 +643,7 @@ SPL_METHOD(SplDoublyLinkedList, top)
        intern = Z_SPLDLLIST_P(getThis());
        value = spl_ptr_llist_last(intern->llist);
 
-       if (value == NULL || ZVAL_IS_UNDEF(value)) {
+       if (value == NULL || Z_ISUNDEF_P(value)) {
                zend_throw_exception(spl_ce_RuntimeException, "Can't peek at an empty datastructure", 0 TSRMLS_CC);
                return;
        }
@@ -666,7 +666,7 @@ SPL_METHOD(SplDoublyLinkedList, bottom)
        intern = Z_SPLDLLIST_P(getThis());
        value  = spl_ptr_llist_first(intern->llist);
 
-       if (value == NULL || ZVAL_IS_UNDEF(value)) {
+       if (value == NULL || Z_ISUNDEF_P(value)) {
                zend_throw_exception(spl_ce_RuntimeException, "Can't peek at an empty datastructure", 0 TSRMLS_CC);
                return;
        }
@@ -997,7 +997,7 @@ static zval *spl_dllist_it_get_current_data(zend_object_iterator *iter TSRMLS_DC
        spl_dllist_it         *iterator = (spl_dllist_it *)iter;
        spl_ptr_llist_element *element  = iterator->traverse_pointer;
 
-       if (element == NULL || ZVAL_IS_UNDEF(&element->data)) {
+       if (element == NULL || Z_ISUNDEF(element->data)) {
                return NULL;
        }
 
@@ -1105,7 +1105,7 @@ SPL_METHOD(SplDoublyLinkedList, current)
                return;
        }
 
-       if (element == NULL || ZVAL_IS_UNDEF(&element->data)) {
+       if (element == NULL || Z_ISUNDEF(element->data)) {
                RETURN_NULL();
        } else {
                RETURN_ZVAL(&element->data, 1, 0);
index 5f7452bed28da445841316f83472957d350f47e5..9983025165e8c05c941a95fcbb3d8f60de0b4121 100644 (file)
@@ -171,7 +171,7 @@ static HashTable* spl_fixedarray_object_get_properties(zval *obj TSRMLS_DC) /* {
                int j = zend_hash_num_elements(ht);
 
                for (i = 0; i < intern->array->size; i++) {
-                       if (!ZVAL_IS_UNDEF(&intern->array->elements[i])) {
+                       if (!Z_ISUNDEF(intern->array->elements[i])) {
                                zend_hash_index_update(ht, i, &intern->array->elements[i]);
                                if (Z_REFCOUNTED(intern->array->elements[i])){
                                        Z_ADDREF(intern->array->elements[i]);
@@ -346,7 +346,7 @@ static inline zval *spl_fixedarray_object_read_dimension_helper(spl_fixedarray_o
        if (index < 0 || intern->array == NULL || index >= intern->array->size) {
                zend_throw_exception(spl_ce_RuntimeException, "Index invalid or out of range", 0 TSRMLS_CC);
                return NULL;
-       } else if (ZVAL_IS_UNDEF(&intern->array->elements[index])) {
+       } else if (Z_ISUNDEF(intern->array->elements[index])) {
                return NULL;
        } else {
                return &intern->array->elements[index];
@@ -370,7 +370,7 @@ static zval *spl_fixedarray_object_read_dimension(zval *object, zval *offset, in
                }
                zend_call_method_with_1_params(object, intern->std.ce, &intern->fptr_offset_get, "offsetGet", &rv, offset);
                zval_ptr_dtor(offset);
-               if (!ZVAL_IS_UNDEF(&rv)) {
+               if (!Z_ISUNDEF(rv)) {
                        zval_ptr_dtor(&intern->retval);
                        ZVAL_ZVAL(&intern->retval, &rv, 0, 0);
                        return &intern->retval;
@@ -402,7 +402,7 @@ static inline void spl_fixedarray_object_write_dimension_helper(spl_fixedarray_o
                zend_throw_exception(spl_ce_RuntimeException, "Index invalid or out of range", 0 TSRMLS_CC);
                return;
        } else {
-               if (!ZVAL_IS_UNDEF(&intern->array->elements[index])) {
+               if (!Z_ISUNDEF(intern->array->elements[index])) {
                        zval_ptr_dtor(&(intern->array->elements[index]));
                }
                SEPARATE_ARG_IF_REF(value);
@@ -488,7 +488,7 @@ static inline int spl_fixedarray_object_has_dimension_helper(spl_fixedarray_obje
        if (index < 0 || intern->array == NULL || index >= intern->array->size) {
                retval = 0;
        } else {
-               if (ZVAL_IS_UNDEF(&intern->array->elements[index])) {
+               if (Z_ISUNDEF(intern->array->elements[index])) {
                        retval = 0;
                } else if (check_empty) {
                        if (zend_is_true(&intern->array->elements[index] TSRMLS_CC)) {
@@ -516,7 +516,7 @@ static int spl_fixedarray_object_has_dimension(zval *object, zval *offset, int c
                SEPARATE_ARG_IF_REF(offset);
                zend_call_method_with_1_params(object, intern->std.ce, &intern->fptr_offset_has, "offsetExists", &rv, offset);
                zval_ptr_dtor(offset);
-               if (!ZVAL_IS_UNDEF(&rv)) {
+               if (!Z_ISUNDEF(rv)) {
                        zval_ptr_dtor(&intern->retval);
                        ZVAL_ZVAL(&intern->retval, &rv, 0, 0);
                        return zend_is_true(&intern->retval TSRMLS_CC);
@@ -536,7 +536,7 @@ static int spl_fixedarray_object_count_elements(zval *object, long *count TSRMLS
        if (intern->fptr_count) {
                zval rv;
                zend_call_method_with_0_params(object, intern->std.ce, &intern->fptr_count, "count", &rv);
-               if (!ZVAL_IS_UNDEF(&rv)) {
+               if (!Z_ISUNDEF(rv)) {
                        zval_ptr_dtor(&intern->retval);
                        ZVAL_ZVAL(&intern->retval, &rv, 0, 0);
                        convert_to_long(&intern->retval);
@@ -651,7 +651,7 @@ SPL_METHOD(SplFixedArray, toArray)
        if (intern->array) {
                int i = 0;
                for (; i < intern->array->size; i++) {
-                       if (!ZVAL_IS_UNDEF(&intern->array->elements[i])) {
+                       if (!Z_ISUNDEF(intern->array->elements[i])) {
                                zend_hash_index_update(Z_ARRVAL_P(return_value), i, &intern->array->elements[i]);
                                if (Z_REFCOUNTED(intern->array->elements[i])) {
                                        Z_ADDREF(intern->array->elements[i]);
index f8ce102967818be19529cf92c7d27bec18942b7e..52b4371f5750c858e62c25822087ce0c0e4e48e7 100644 (file)
@@ -92,7 +92,7 @@ static inline spl_heap_object *spl_heap_from_obj(zend_object *obj) /* {{{ */ {
 #define Z_SPLHEAP_P(zv)  spl_heap_from_obj(Z_OBJ_P((zv)))
 
 static void spl_ptr_heap_zval_dtor(zval *elem TSRMLS_DC) { /* {{{ */
-       if (!ZVAL_IS_UNDEF(elem)) {
+       if (!Z_ISUNDEF_P(elem)) {
                zval_ptr_dtor(elem);
        }
 }
@@ -271,7 +271,7 @@ static zval *spl_ptr_heap_top(spl_ptr_heap *heap) { /* {{{ */
                return NULL;
        }
 
-       return ZVAL_IS_UNDEF(&heap->elements[0])? NULL : &heap->elements[0];
+       return Z_ISUNDEF(heap->elements[0])? NULL : &heap->elements[0];
 }
 /* }}} */
 
@@ -364,7 +364,7 @@ static void spl_heap_object_free_storage(zend_object *object TSRMLS_DC) /* {{{ *
        zend_object_std_dtor(&intern->std TSRMLS_CC);
 
        for (i = 0; i < intern->heap->count; ++i) {
-               if (!ZVAL_IS_UNDEF(&intern->heap->elements[i])) {
+               if (!Z_ISUNDEF(intern->heap->elements[i])) {
                        zval_ptr_dtor(&intern->heap->elements[i]);
                }
        }
@@ -490,7 +490,7 @@ static int spl_heap_object_count_elements(zval *object, long *count TSRMLS_DC) /
        if (intern->fptr_count) {
                zval rv;
                zend_call_method_with_0_params(object, intern->std.ce, &intern->fptr_count, "count", &rv);
-               if (!ZVAL_IS_UNDEF(&rv)) {
+               if (!Z_ISUNDEF(rv)) {
                        zval_ptr_dtor(&intern->retval);
                        ZVAL_ZVAL(&intern->retval, &rv, 0, 0);
                        convert_to_long(&intern->retval);
@@ -643,7 +643,7 @@ SPL_METHOD(SplHeap, extract)
 
        spl_ptr_heap_delete_top(intern->heap, &value, getThis() TSRMLS_CC);
 
-       if (ZVAL_IS_UNDEF(&value)) {
+       if (Z_ISUNDEF(value)) {
                zend_throw_exception(spl_ce_RuntimeException, "Can't extract from an empty heap", 0 TSRMLS_CC);
                return;
        }
@@ -703,7 +703,7 @@ SPL_METHOD(SplPriorityQueue, extract)
 
        spl_ptr_heap_delete_top(intern->heap, &value, getThis() TSRMLS_CC);
 
-       if (ZVAL_IS_UNDEF(&value)) {
+       if (Z_ISUNDEF(value)) {
                zend_throw_exception(spl_ce_RuntimeException, "Can't extract from an empty heap", 0 TSRMLS_CC);
                return;
        }
@@ -900,7 +900,7 @@ static zval *spl_heap_it_get_current_data(zend_object_iterator *iter TSRMLS_DC)
                return NULL;
        }
 
-       if (object->heap->count == 0 || ZVAL_IS_UNDEF(element)) {
+       if (object->heap->count == 0 || Z_ISUNDEF_P(element)) {
                return NULL;
        } else {
                return element;
@@ -918,7 +918,7 @@ static zval *spl_pqueue_it_get_current_data(zend_object_iterator *iter TSRMLS_DC
                return NULL;
        }
 
-       if (object->heap->count == 0 || ZVAL_IS_UNDEF(element)) {
+       if (object->heap->count == 0 || Z_ISUNDEF_P(element)) {
                return NULL;
        } else {
                zval *data = spl_pqueue_extract_helper(element, object->flags);
@@ -1022,7 +1022,7 @@ SPL_METHOD(SplHeap, current)
                return;
        }
 
-       if (!intern->heap->count || ZVAL_IS_UNDEF(element)) {
+       if (!intern->heap->count || Z_ISUNDEF_P(element)) {
                RETURN_NULL();
        } else {
                RETURN_ZVAL(element, 1, 0);
@@ -1041,7 +1041,7 @@ SPL_METHOD(SplPriorityQueue, current)
                return;
        }
 
-       if (!intern->heap->count || ZVAL_IS_UNDEF(element)) {
+       if (!intern->heap->count || Z_ISUNDEF_P(element)) {
                RETURN_NULL();
        } else {
                zval *data = spl_pqueue_extract_helper(element, intern->flags);
index 6d74169f2463c0147fd7b6e5111b3d7721267863..7900b4b5b2d17f1cccc57a3ec5c96ee9416e8513 100644 (file)
@@ -1560,7 +1560,7 @@ SPL_METHOD(dual_it, getInnerIterator)
        
        SPL_FETCH_AND_CHECK_DUAL_IT(intern, getThis());
 
-       if (!ZVAL_IS_UNDEF(&intern->inner.zobject)) {
+       if (!Z_ISUNDEF(intern->inner.zobject)) {
                RETVAL_ZVAL(&intern->inner.zobject, 1, 0);
        } else {
                RETURN_NULL();
@@ -2047,7 +2047,7 @@ SPL_METHOD(RegexIterator, accept)
        if (use_copy) {
                efree(subject);
        }
-       if (!ZVAL_IS_UNDEF(&subject_copy)) {
+       if (!Z_ISUNDEF(subject_copy)) {
                zval_ptr_dtor(&subject_copy);
        }
 } /* }}} */
@@ -2221,7 +2221,7 @@ static void spl_dual_it_free_storage(zend_object *_object TSRMLS_DC)
        spl_dual_it_object *object = spl_dual_it_from_obj(_object);
 
 
-       if (!ZVAL_IS_UNDEF(&object->inner.zobject)) {
+       if (!Z_ISUNDEF(object->inner.zobject)) {
                zval_ptr_dtor(&object->inner.zobject);
        }
        
@@ -3226,7 +3226,7 @@ int spl_append_it_next_iterator(spl_dual_it_object *intern TSRMLS_DC) /* {{{*/
 {
        spl_dual_it_free(intern TSRMLS_CC);
 
-       if (!ZVAL_IS_UNDEF(&intern->inner.zobject)) {
+       if (!Z_ISUNDEF(intern->inner.zobject)) {
                zval_ptr_dtor(&intern->inner.zobject);
                ZVAL_UNDEF(&intern->inner.zobject);
                intern->inner.ce = NULL;
index 110951d01547a109640d044528eaafca14541457..355762c503e2487ec7e599d4287739096ad6249a 100644 (file)
@@ -120,7 +120,7 @@ static zend_string *spl_object_storage_get_hash(spl_SplObjectStorage *intern, zv
        if (intern->fptr_get_hash) {
                zval rv;
                zend_call_method_with_1_params(this, intern->std.ce, &intern->fptr_get_hash, "getHash", &rv, obj);
-               if (!ZVAL_IS_UNDEF(&rv)) {
+               if (!Z_ISUNDEF(rv)) {
                        if (Z_TYPE(rv) == IS_STRING) {
                                return Z_STR(rv);
                        } else {
@@ -879,10 +879,10 @@ SPL_METHOD(SplObjectStorage, unserialize)
                pelement = spl_object_storage_get(intern, hash TSRMLS_CC);
                spl_object_storage_free_hash(intern, hash);
                if (pelement) {
-                       if (!ZVAL_IS_UNDEF(&pelement->inf)) {
+                       if (!Z_ISUNDEF(pelement->inf)) {
                                var_push_dtor(&var_hash, &pelement->inf);
                        }
-                       if (!ZVAL_IS_UNDEF(&pelement->obj)) {
+                       if (!Z_ISUNDEF(pelement->obj)) {
                                var_push_dtor(&var_hash, &pelement->obj);
                        }
                } 
@@ -1148,7 +1148,7 @@ SPL_METHOD(MultipleIterator, valid)
                it = &element->obj;
                zend_call_method_with_0_params(it, Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs.zf_valid, "valid", &retval);
 
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        valid = (Z_TYPE(retval) == IS_TRUE);
                        zval_ptr_dtor(&retval);
                } else {
@@ -1184,7 +1184,7 @@ static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_
                it = &element->obj;
                zend_call_method_with_0_params(it, Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs.zf_valid, "valid", &retval);
 
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        valid = Z_TYPE(retval) == IS_TRUE;
                        zval_ptr_dtor(&retval);
                } else {
@@ -1197,7 +1197,7 @@ static void spl_multiple_iterator_get_all(spl_SplObjectStorage *intern, int get_
                        } else {
                                zend_call_method_with_0_params(it, Z_OBJCE_P(it), &Z_OBJCE_P(it)->iterator_funcs.zf_key, "key", &retval);
                        }
-                       if (ZVAL_IS_UNDEF(&retval)) {
+                       if (Z_ISUNDEF(retval)) {
                                zend_throw_exception(spl_ce_RuntimeException, "Failed to call sub iterator method", 0 TSRMLS_CC);
                                return;
                        }
index bfbb3fbdd11d69fdc8e57190d66322e2f00e0717..c31ef3e1c11a9ba137c6101bf4cd4eaa241d4df0 100644 (file)
@@ -699,7 +699,7 @@ static int sqlite3_do_callback(struct php_sqlite3_fci *fc, zval *cb, int argc, s
                /* summon the aggregation context */
                agg_context = (php_sqlite3_agg_context *)sqlite3_aggregate_context(context, sizeof(php_sqlite3_agg_context));
 
-               if (ZVAL_IS_UNDEF(&agg_context->zval_context)) {
+               if (Z_ISUNDEF(agg_context->zval_context)) {
                        ZVAL_NULL(&agg_context->zval_context);
                }
                ZVAL_COPY_VALUE(&zargs[0], &agg_context->zval_context);
@@ -752,7 +752,7 @@ static int sqlite3_do_callback(struct php_sqlite3_fci *fc, zval *cb, int argc, s
        if (!is_agg || !argv) {
                /* only set the sqlite return value if we are a scalar function,
                 * or if we are finalizing an aggregate */
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        switch (Z_TYPE(retval)) {
                                case IS_LONG:
 #if LONG_MAX > 2147483647
@@ -779,20 +779,20 @@ static int sqlite3_do_callback(struct php_sqlite3_fci *fc, zval *cb, int argc, s
                        sqlite3_result_error(context, "failed to invoke callback", 0);
                }
 
-               if (agg_context && !ZVAL_IS_UNDEF(&agg_context->zval_context)) {
+               if (agg_context && !Z_ISUNDEF(agg_context->zval_context)) {
                        zval_ptr_dtor(&agg_context->zval_context);
                }
        } else {
                /* we're stepping in an aggregate; the return value goes into
                 * the context */
-               if (agg_context && !ZVAL_IS_UNDEF(&agg_context->zval_context)) {
+               if (agg_context && !Z_ISUNDEF(agg_context->zval_context)) {
                        zval_ptr_dtor(&agg_context->zval_context);
                }
                ZVAL_COPY_VALUE(&agg_context->zval_context, &retval);
                ZVAL_UNDEF(&retval);
        }
 
-       if (!ZVAL_IS_UNDEF(&retval)) {
+       if (!Z_ISUNDEF(retval)) {
                zval_ptr_dtor(&retval);
        }
        return ret;
@@ -1393,7 +1393,7 @@ PHP_METHOD(sqlite3stmt, bindParam)
        ZVAL_COPY(&param.parameter, parameter);
 
        if (!register_bound_parameter_to_sqlite(&param, stmt_obj TSRMLS_CC)) {
-               if (!ZVAL_IS_UNDEF(&param.parameter)) {
+               if (!Z_ISUNDEF(param.parameter)) {
                        zval_ptr_dtor(&(param.parameter));
                        ZVAL_UNDEF(&param.parameter);
                }
@@ -1425,7 +1425,7 @@ PHP_METHOD(sqlite3stmt, bindValue)
        ZVAL_COPY(&param.parameter, parameter);
 
        if (!register_bound_parameter_to_sqlite(&param, stmt_obj TSRMLS_CC)) {
-               if (!ZVAL_IS_UNDEF(&param.parameter)) {
+               if (!Z_ISUNDEF(param.parameter)) {
                        zval_ptr_dtor(&(param.parameter));
                        ZVAL_UNDEF(&param.parameter);
                }
@@ -2010,13 +2010,13 @@ static void php_sqlite3_object_free_storage(zend_object *object TSRMLS_DC) /* {{
 
                efree((char*)func->func_name);
 
-               if (!ZVAL_IS_UNDEF(&func->func)) {
+               if (!Z_ISUNDEF(func->func)) {
                        zval_ptr_dtor(&func->func);
                }
-               if (!ZVAL_IS_UNDEF(&func->step)) {
+               if (!Z_ISUNDEF(func->step)) {
                        zval_ptr_dtor(&func->step);
                }
-               if (!ZVAL_IS_UNDEF(&func->fini)) {
+               if (!Z_ISUNDEF(func->fini)) {
                        zval_ptr_dtor(&func->fini);
                }
                efree(func);
@@ -2029,7 +2029,7 @@ static void php_sqlite3_object_free_storage(zend_object *object TSRMLS_DC) /* {{
                        sqlite3_create_collation(intern->db, collation->collation_name, SQLITE_UTF8, NULL, NULL);
                }
                efree((char*)collation->collation_name);
-               if (!ZVAL_IS_UNDEF(&collation->cmp_func)) {
+               if (!Z_ISUNDEF(collation->cmp_func)) {
                        zval_ptr_dtor(&collation->cmp_func);
                }
                efree(collation);
@@ -2063,7 +2063,7 @@ static void php_sqlite3_stmt_object_free_storage(zend_object *object TSRMLS_DC)
                        (int (*)(void *, void *)) php_sqlite3_compare_stmt_free);
        }
 
-       if (!ZVAL_IS_UNDEF(&intern->db_obj_zval)) {
+       if (!Z_ISUNDEF(intern->db_obj_zval)) {
                zval_ptr_dtor(&intern->db_obj_zval);
        }
 
@@ -2079,7 +2079,7 @@ static void php_sqlite3_result_object_free_storage(zend_object *object TSRMLS_DC
                return;
        }
 
-       if (!ZVAL_IS_NULL(&intern->stmt_obj_zval)) {
+       if (!Z_ISNULL(intern->stmt_obj_zval)) {
                if (intern->stmt_obj->initialised) {
                        sqlite3_reset(intern->stmt_obj->stmt);
                }
@@ -2150,7 +2150,7 @@ static void sqlite3_param_dtor(zval *data) /* {{{ */
                STR_RELEASE(param->name);
        }
 
-       if (!ZVAL_IS_NULL(&param->parameter)) {
+       if (!Z_ISNULL(param->parameter)) {
                zval_ptr_dtor(&(param->parameter));
                ZVAL_UNDEF(&param->parameter);
        }
index eb8a9cd325e50eb3df76ace1f3c3e151db0816d3..b8e0409d0619f40c43c03e150fe1976948c8ffa7 100644 (file)
@@ -4210,7 +4210,7 @@ PHP_FUNCTION(array_filter)
                                if (use_type == ARRAY_FILTER_USE_BOTH) {
                                        zval_ptr_dtor(&args[1]);                                                
                                }
-                               if (!ZVAL_IS_UNDEF(&retval)) {
+                               if (!Z_ISUNDEF(retval)) {
                                        int retval_true = zend_is_true(&retval TSRMLS_CC);
 
                                        zval_ptr_dtor(&retval);
index 71cdc1392764bfc6ad4fa07060a69e81aae3aca1..81afb2228e10c321fd5a18db2969af1e2fc878e9 100644 (file)
@@ -500,7 +500,7 @@ PHP_FUNCTION(stream_get_meta_data)
 
        array_init(return_value);
 
-       if (!ZVAL_IS_UNDEF(&stream->wrapperdata)) {
+       if (!Z_ISUNDEF(stream->wrapperdata)) {
                Z_ADDREF_P(&stream->wrapperdata);
                add_assoc_zval(return_value, "wrapper_data", &stream->wrapperdata);
        }
index 76b6dd21461bf61e3c5b9e1fca9ffe69d84efe5e..146ff004f7ad866a4fbc0ec33acd39abbb6a9d9e 100644 (file)
@@ -400,43 +400,43 @@ static void xml_parser_dtor(zend_resource *rsrc TSRMLS_DC)
                        efree(parser->ltags[ inx ]);
                efree(parser->ltags);
        }
-       if (!ZVAL_IS_UNDEF(&parser->startElementHandler)) {
+       if (!Z_ISUNDEF(parser->startElementHandler)) {
                zval_ptr_dtor(&parser->startElementHandler);
        }
-       if (!ZVAL_IS_UNDEF(&parser->endElementHandler)) {
+       if (!Z_ISUNDEF(parser->endElementHandler)) {
                zval_ptr_dtor(&parser->endElementHandler);
        }
-       if (!ZVAL_IS_UNDEF(&parser->characterDataHandler)) {
+       if (!Z_ISUNDEF(parser->characterDataHandler)) {
                zval_ptr_dtor(&parser->characterDataHandler);
        }
-       if (!ZVAL_IS_UNDEF(&parser->processingInstructionHandler)) {
+       if (!Z_ISUNDEF(parser->processingInstructionHandler)) {
                zval_ptr_dtor(&parser->processingInstructionHandler);
        }
-       if (!ZVAL_IS_UNDEF(&parser->defaultHandler)) {
+       if (!Z_ISUNDEF(parser->defaultHandler)) {
                zval_ptr_dtor(&parser->defaultHandler);
        }
-       if (!ZVAL_IS_UNDEF(&parser->unparsedEntityDeclHandler)) {
+       if (!Z_ISUNDEF(parser->unparsedEntityDeclHandler)) {
                zval_ptr_dtor(&parser->unparsedEntityDeclHandler);
        }
-       if (!ZVAL_IS_UNDEF(&parser->notationDeclHandler)) {
+       if (!Z_ISUNDEF(parser->notationDeclHandler)) {
                zval_ptr_dtor(&parser->notationDeclHandler);
        }
-       if (!ZVAL_IS_UNDEF(&parser->externalEntityRefHandler)) {
+       if (!Z_ISUNDEF(parser->externalEntityRefHandler)) {
                zval_ptr_dtor(&parser->externalEntityRefHandler);
        }
-       if (!ZVAL_IS_UNDEF(&parser->unknownEncodingHandler)) {
+       if (!Z_ISUNDEF(parser->unknownEncodingHandler)) {
                zval_ptr_dtor(&parser->unknownEncodingHandler);
        }
-       if (!ZVAL_IS_UNDEF(&parser->startNamespaceDeclHandler)) {
+       if (!Z_ISUNDEF(parser->startNamespaceDeclHandler)) {
                zval_ptr_dtor(&parser->startNamespaceDeclHandler);
        }
-       if (!ZVAL_IS_UNDEF(&parser->endNamespaceDeclHandler)) {
+       if (!Z_ISUNDEF(parser->endNamespaceDeclHandler)) {
                zval_ptr_dtor(&parser->endNamespaceDeclHandler);
        }
        if (parser->baseURI) {
                efree(parser->baseURI);
        }
-       if (!ZVAL_IS_UNDEF(&parser->object)) {
+       if (!Z_ISUNDEF(parser->object)) {
                zval_ptr_dtor(&parser->object);
        }
 
@@ -675,7 +675,7 @@ static void _xml_add_to_info(xml_parser *parser,char *name)
 {
        zval *element;
 
-       if (ZVAL_IS_UNDEF(&parser->info)) {
+       if (Z_ISUNDEF(parser->info)) {
                return;
        }
 
@@ -719,7 +719,7 @@ void _xml_startElementHandler(void *userData, const XML_Char *name, const XML_Ch
 
                tag_name = _xml_decode_tag(parser, (const char *)name);
 
-               if (!ZVAL_IS_UNDEF(&parser->startElementHandler)) {
+               if (!Z_ISUNDEF(parser->startElementHandler)) {
                        ZVAL_COPY(&args[0], &parser->index);
                        ZVAL_STRING(&args[1], tag_name->val + parser->toffset);
                        array_init(&args[2]);
@@ -737,12 +737,12 @@ void _xml_startElementHandler(void *userData, const XML_Char *name, const XML_Ch
                        }
                        
                        xml_call_handler(parser, &parser->startElementHandler, parser->startElementPtr, 3, args, &retval);
-                       if (!ZVAL_IS_UNDEF(&retval)) {
+                       if (!Z_ISUNDEF(retval)) {
                                zval_ptr_dtor(&retval);
                        }
                } 
 
-               if (!ZVAL_IS_UNDEF(&parser->data)) {
+               if (!Z_ISUNDEF(parser->data)) {
                        if (parser->level <= XML_MAXLEVEL)  {
                                zval tag, atr;
                                int atcnt = 0;
@@ -803,17 +803,17 @@ void _xml_endElementHandler(void *userData, const XML_Char *name)
 
                tag_name = _xml_decode_tag(parser, (const char *)name);
 
-               if (!ZVAL_IS_UNDEF(&parser->endElementHandler)) {
+               if (!Z_ISUNDEF(parser->endElementHandler)) {
                        ZVAL_COPY(&args[0], &parser->index);
                        ZVAL_STRING(&args[1], (tag_name->val) + parser->toffset);
 
                        xml_call_handler(parser, &parser->endElementHandler, parser->endElementPtr, 2, args, &retval);
-                       if (ZVAL_IS_UNDEF(&retval)) {
+                       if (Z_ISUNDEF(retval)) {
                                zval_ptr_dtor(&retval);
                        }
                } 
 
-               if (!ZVAL_IS_UNDEF(&parser->data)) {
+               if (!Z_ISUNDEF(parser->data)) {
                        zval tag;
 
                        if (parser->lastwasopen) {
@@ -852,16 +852,16 @@ void _xml_characterDataHandler(void *userData, const XML_Char *s, int len)
        if (parser) {
                zval retval, args[2];
 
-               if (!ZVAL_IS_UNDEF(&parser->characterDataHandler)) {
+               if (!Z_ISUNDEF(parser->characterDataHandler)) {
                        ZVAL_COPY(&args[0], &parser->index);
                        _xml_xmlchar_zval(s, len, parser->target_encoding, &args[1]);
                        xml_call_handler(parser, &parser->characterDataHandler, parser->characterDataPtr, 2, args, &retval);
-                       if (!ZVAL_IS_UNDEF(&retval)) {
+                       if (!Z_ISUNDEF(retval)) {
                                zval_ptr_dtor(&retval);
                        }
                } 
 
-               if (!ZVAL_IS_UNDEF(&parser->data)) {
+               if (!Z_ISUNDEF(parser->data)) {
                        int i;
                        int doprint = 0;
                        zend_string *decoded_value;
@@ -946,14 +946,14 @@ void _xml_processingInstructionHandler(void *userData, const XML_Char *target, c
 {
        xml_parser *parser = (xml_parser *)userData;
 
-       if (parser && !ZVAL_IS_UNDEF(&parser->processingInstructionHandler)) {
+       if (parser && !Z_ISUNDEF(parser->processingInstructionHandler)) {
                zval retval, args[3];
 
                ZVAL_COPY(&args[0], &parser->index);
                _xml_xmlchar_zval(target, 0, parser->target_encoding, &args[1]);
                _xml_xmlchar_zval(data, 0, parser->target_encoding, &args[2]);
                xml_call_handler(parser, &parser->processingInstructionHandler, parser->processingInstructionPtr, 3, args, &retval);
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        zval_ptr_dtor(&retval);
                }
        }
@@ -965,13 +965,13 @@ void _xml_defaultHandler(void *userData, const XML_Char *s, int len)
 {
        xml_parser *parser = (xml_parser *)userData;
 
-       if (parser && !ZVAL_IS_UNDEF(&parser->defaultHandler)) {
+       if (parser && !Z_ISUNDEF(parser->defaultHandler)) {
                zval retval, args[2];
 
                ZVAL_COPY(&args[0], &parser->index);
                _xml_xmlchar_zval(s, len, parser->target_encoding, &args[1]);
                xml_call_handler(parser, &parser->defaultHandler, parser->defaultPtr, 2, args, &retval);
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        zval_ptr_dtor(&retval);
                }
        }
@@ -988,7 +988,7 @@ void _xml_unparsedEntityDeclHandler(void *userData,
 {
        xml_parser *parser = (xml_parser *)userData;
 
-       if (parser && !ZVAL_IS_UNDEF(&parser->unparsedEntityDeclHandler)) {
+       if (parser && !Z_ISUNDEF(parser->unparsedEntityDeclHandler)) {
                zval retval, args[6];
 
                ZVAL_COPY(&args[0], &parser->index);
@@ -998,7 +998,7 @@ void _xml_unparsedEntityDeclHandler(void *userData,
                _xml_xmlchar_zval(publicId, 0, parser->target_encoding, &args[4]);
                _xml_xmlchar_zval(notationName, 0, parser->target_encoding, &args[5]);
                xml_call_handler(parser, &parser->unparsedEntityDeclHandler, parser->unparsedEntityDeclPtr, 6, args, &retval);
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        zval_ptr_dtor(&retval);
                }
        }
@@ -1014,7 +1014,7 @@ void _xml_notationDeclHandler(void *userData,
 {
        xml_parser *parser = (xml_parser *)userData;
 
-       if (parser && !ZVAL_IS_UNDEF(&parser->notationDeclHandler)) {
+       if (parser && !Z_ISUNDEF(parser->notationDeclHandler)) {
                zval retval, args[5];
 
                ZVAL_COPY(&args[0], &parser->index);
@@ -1023,7 +1023,7 @@ void _xml_notationDeclHandler(void *userData,
                _xml_xmlchar_zval(systemId, 0, parser->target_encoding, &args[3]);
                _xml_xmlchar_zval(publicId, 0, parser->target_encoding, &args[4]);
                xml_call_handler(parser, &parser->notationDeclHandler, parser->notationDeclPtr, 5, args, &retval);
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        zval_ptr_dtor(&retval);
                }
        }
@@ -1040,7 +1040,7 @@ int _xml_externalEntityRefHandler(XML_Parser parserPtr,
        xml_parser *parser = XML_GetUserData(parserPtr);
        int ret = 0; /* abort if no handler is set (should be configurable?) */
 
-       if (parser && !ZVAL_IS_UNDEF(&parser->externalEntityRefHandler)) {
+       if (parser && !Z_ISUNDEF(parser->externalEntityRefHandler)) {
                zval retval, args[5];
 
                ZVAL_COPY(&args[0], &parser->index);
@@ -1049,7 +1049,7 @@ int _xml_externalEntityRefHandler(XML_Parser parserPtr,
                _xml_xmlchar_zval(systemId, 0, parser->target_encoding, &args[3]);
                _xml_xmlchar_zval(publicId, 0, parser->target_encoding, &args[4]);
                xml_call_handler(parser, &parser->externalEntityRefHandler, parser->externalEntityRefPtr, 5, args, &retval);
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        convert_to_long(&retval);
                        ret = Z_LVAL(retval);
                } else {
@@ -1065,14 +1065,14 @@ void _xml_startNamespaceDeclHandler(void *userData,const XML_Char *prefix, const
 {
        xml_parser *parser = (xml_parser *)userData;
 
-       if (parser && !ZVAL_IS_UNDEF(&parser->startNamespaceDeclHandler)) {
+       if (parser && !Z_ISUNDEF(parser->startNamespaceDeclHandler)) {
                zval retval, args[3];
 
                ZVAL_COPY(&args[0], &parser->index);
                _xml_xmlchar_zval(prefix, 0, parser->target_encoding, &args[1]);
                _xml_xmlchar_zval(uri, 0, parser->target_encoding, &args[2]);
                xml_call_handler(parser, &parser->startNamespaceDeclHandler, parser->startNamespaceDeclPtr, 3, args, &retval);
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        zval_ptr_dtor(&retval);
                }
        }
@@ -1084,13 +1084,13 @@ void _xml_endNamespaceDeclHandler(void *userData, const XML_Char *prefix)
 {
        xml_parser *parser = (xml_parser *)userData;
 
-       if (parser && !ZVAL_IS_UNDEF(&parser->endNamespaceDeclHandler)) {
+       if (parser && !Z_ISUNDEF(parser->endNamespaceDeclHandler)) {
                zval retval, args[2];
 
                ZVAL_COPY(&args[0], &parser->index);
                _xml_xmlchar_zval(prefix, 0, parser->target_encoding, &args[1]);
                xml_call_handler(parser, &parser->endNamespaceDeclHandler, parser->endNamespaceDeclPtr, 2, args, &retval);
-               if (!ZVAL_IS_UNDEF(&retval)) {
+               if (!Z_ISUNDEF(retval)) {
                        zval_ptr_dtor(&retval);
                }
        }
@@ -1186,7 +1186,7 @@ PHP_FUNCTION(xml_set_object)
        ZEND_FETCH_RESOURCE(parser,xml_parser *, pind, -1, "XML Parser", le_xml_parser);
 
        /* please leave this commented - or ask thies@thieso.net before doing it (again) */
-       if (!ZVAL_IS_UNDEF(&parser->object)) {
+       if (!Z_ISUNDEF(parser->object)) {
                zval_ptr_dtor(&parser->object);
        }
 
index 86104964fcfdc41207123d6b5625ef067abca027..a759f3da247614a5adb2abee1715e5f5b150fb6c 100644 (file)
@@ -374,7 +374,7 @@ static php_stream *user_wrapper_opener(php_stream_wrapper *wrapper, const char *
        ZVAL_STRING(&zfuncname, USERSTREAM_OPEN);
 
        call_result = call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &zfuncname,
                        &zretval,
                        4, args,
@@ -449,7 +449,7 @@ static php_stream *user_wrapper_opendir(php_stream_wrapper *wrapper, const char
        ZVAL_STRING(&zfuncname, USERSTREAM_DIR_OPEN);
 
        call_result = call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &zfuncname,
                        &zretval,
                        2, args,
@@ -599,7 +599,7 @@ static size_t php_userstreamop_write(php_stream *stream, const char *buf, size_t
        ZVAL_STRINGL(&args[0], (char*)buf, count);
 
        call_result = call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &func_name,
                        &retval,
                        1, args,
@@ -645,7 +645,7 @@ static size_t php_userstreamop_read(php_stream *stream, char *buf, size_t count
        ZVAL_LONG(&args[0], count);
 
        call_result = call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &func_name,
                        &retval,
                        1, args,
@@ -676,7 +676,7 @@ static size_t php_userstreamop_read(php_stream *stream, char *buf, size_t count
        ZVAL_STRINGL(&func_name, USERSTREAM_EOF, sizeof(USERSTREAM_EOF)-1);
 
        call_result = call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &func_name,
                        &retval,
                        0, NULL, 0, NULL TSRMLS_CC);
@@ -708,7 +708,7 @@ static int php_userstreamop_close(php_stream *stream, int close_handle TSRMLS_DC
        ZVAL_STRINGL(&func_name, USERSTREAM_CLOSE, sizeof(USERSTREAM_CLOSE)-1);
 
        call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &func_name,
                        &retval,
                        0, NULL, 0, NULL TSRMLS_CC);
@@ -736,7 +736,7 @@ static int php_userstreamop_flush(php_stream *stream TSRMLS_DC)
        ZVAL_STRINGL(&func_name, USERSTREAM_FLUSH, sizeof(USERSTREAM_FLUSH)-1);
 
        call_result = call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &func_name,
                        &retval,
                        0, NULL, 0, NULL TSRMLS_CC);
@@ -768,7 +768,7 @@ static int php_userstreamop_seek(php_stream *stream, off_t offset, int whence, o
        ZVAL_LONG(&args[1], whence);
 
        call_result = call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &func_name,
                        &retval,
                        2, args,
@@ -803,7 +803,7 @@ static int php_userstreamop_seek(php_stream *stream, off_t offset, int whence, o
        ZVAL_STRINGL(&func_name, USERSTREAM_TELL, sizeof(USERSTREAM_TELL)-1);
 
        call_result = call_user_function_ex(NULL,
-               ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+               Z_ISUNDEF(us->object)? NULL : &us->object,
                &func_name,
                &retval,
                0, NULL, 0, NULL TSRMLS_CC);
@@ -881,7 +881,7 @@ static int php_userstreamop_stat(php_stream *stream, php_stream_statbuf *ssb TSR
        ZVAL_STRINGL(&func_name, USERSTREAM_STAT, sizeof(USERSTREAM_STAT)-1);
 
        call_result = call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &func_name,
                        &retval,
                        0, NULL, 0, NULL TSRMLS_CC);
@@ -914,7 +914,7 @@ static int php_userstreamop_set_option(php_stream *stream, int option, int value
        switch (option) {
        case PHP_STREAM_OPTION_CHECK_LIVENESS:
                ZVAL_STRINGL(&func_name, USERSTREAM_EOF, sizeof(USERSTREAM_EOF)-1);
-               call_result = call_user_function_ex(NULL, ZVAL_IS_UNDEF(&us->object)? NULL : &us->object, &func_name, &retval, 0, NULL, 0, NULL TSRMLS_CC);
+               call_result = call_user_function_ex(NULL, Z_ISUNDEF(us->object)? NULL : &us->object, &func_name, &retval, 0, NULL, 0, NULL TSRMLS_CC);
                if (call_result == SUCCESS && (Z_TYPE(retval) == IS_FALSE || Z_TYPE(retval) == IS_TRUE)) {
                        ret = zval_is_true(&retval) ? PHP_STREAM_OPTION_RETURN_ERR : PHP_STREAM_OPTION_RETURN_OK;
                } else {
@@ -949,7 +949,7 @@ static int php_userstreamop_set_option(php_stream *stream, int option, int value
                ZVAL_STRINGL(&func_name, USERSTREAM_LOCK, sizeof(USERSTREAM_LOCK)-1);
 
                call_result = call_user_function_ex(NULL,
-                                               ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                                               Z_ISUNDEF(us->object)? NULL : &us->object,
                                                &func_name,
                                                &retval,
                                                1, args, 0, NULL TSRMLS_CC);
@@ -978,7 +978,7 @@ static int php_userstreamop_set_option(php_stream *stream, int option, int value
                switch (value) {
                case PHP_STREAM_TRUNCATE_SUPPORTED:
                        if (zend_is_callable_ex(&func_name,
-                                       ZVAL_IS_UNDEF(&us->object)? NULL : Z_OBJ(us->object),
+                                       Z_ISUNDEF(us->object)? NULL : Z_OBJ(us->object),
                                        IS_CALLABLE_CHECK_SILENT, NULL, NULL, NULL TSRMLS_CC))
                                ret = PHP_STREAM_OPTION_RETURN_OK;
                        else
@@ -990,7 +990,7 @@ static int php_userstreamop_set_option(php_stream *stream, int option, int value
                        if (new_size >= 0 && new_size <= (ptrdiff_t)LONG_MAX) {
                                ZVAL_LONG(&args[0], (long)new_size);
                                call_result = call_user_function_ex(NULL,
-                                                               ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                                                               Z_ISUNDEF(us->object)? NULL : &us->object,
                                                                &func_name,
                                                                &retval,
                                                                1, args, 0, NULL TSRMLS_CC);
@@ -1054,7 +1054,7 @@ static int php_userstreamop_set_option(php_stream *stream, int option, int value
                }
 
                call_result = call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &func_name,
                        &retval,
                        3, args, 0, NULL TSRMLS_CC);
@@ -1408,7 +1408,7 @@ static size_t php_userstreamop_readdir(php_stream *stream, char *buf, size_t cou
        ZVAL_STRINGL(&func_name, USERSTREAM_DIR_READ, sizeof(USERSTREAM_DIR_READ)-1);
 
        call_result = call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &func_name,
                        &retval,
                        0, NULL,
@@ -1441,7 +1441,7 @@ static int php_userstreamop_closedir(php_stream *stream, int close_handle TSRMLS
        ZVAL_STRINGL(&func_name, USERSTREAM_DIR_CLOSE, sizeof(USERSTREAM_DIR_CLOSE)-1);
 
        call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &func_name,
                        &retval,
                        0, NULL, 0, NULL TSRMLS_CC);
@@ -1465,7 +1465,7 @@ static int php_userstreamop_rewinddir(php_stream *stream, off_t offset, int when
        ZVAL_STRINGL(&func_name, USERSTREAM_DIR_REWIND, sizeof(USERSTREAM_DIR_REWIND)-1);
 
        call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &func_name,
                        &retval,
                        0, NULL, 0, NULL TSRMLS_CC);
@@ -1499,7 +1499,7 @@ static int php_userstreamop_cast(php_stream *stream, int castas, void **retptr T
        }
 
        call_result = call_user_function_ex(NULL,
-                       ZVAL_IS_UNDEF(&us->object)? NULL : &us->object,
+                       Z_ISUNDEF(us->object)? NULL : &us->object,
                        &func_name,
                        &retval,
                        1, args, 0, NULL TSRMLS_CC);
@@ -1510,7 +1510,7 @@ static int php_userstreamop_cast(php_stream *stream, int castas, void **retptr T
                                        us->wrapper->classname);
                        break;
                }
-               if (ZVAL_IS_UNDEF(&retval) || !zend_is_true(&retval TSRMLS_CC)) {
+               if (Z_ISUNDEF(retval) || !zend_is_true(&retval TSRMLS_CC)) {
                        break;
                }
                php_stream_from_zval_no_verify(intstream, &retval);