Back to index

php5  5.3.10
php_simplexml_exports.h
Go to the documentation of this file.
00001 /*
00002   +----------------------------------------------------------------------+
00003   | PHP Version 5                                                        |
00004   +----------------------------------------------------------------------+
00005   | Copyright (c) 1997-2012 The PHP Group                                |
00006   +----------------------------------------------------------------------+
00007   | This source file is subject to version 3.01 of the PHP license,      |
00008   | that is bundled with this package in the file LICENSE, and is        |
00009   | available through the world-wide-web at the following url:           |
00010   | http://www.php.net/license/3_01.txt                                  |
00011   | If you did not receive a copy of the PHP license and are unable to   |
00012   | obtain it through the world-wide-web, please send a note to          |
00013   | license@php.net so we can mail you a copy immediately.               |
00014   +----------------------------------------------------------------------+
00015   | Author: Sterling Hughes <sterling@php.net>                           |
00016   |         Marcus Boerger <helly@php.net>                               |
00017   |         Rob Richards <rrichards@php.net>                             |
00018   +----------------------------------------------------------------------+
00019 */
00020 
00021 /* $Id: php_simplexml_exports.h 321634 2012-01-01 13:15:04Z felipe $ */
00022 
00023 #ifndef PHP_SIMPLEXML_EXPORTS_H
00024 #define PHP_SIMPLEXML_EXPORTS_H
00025 
00026 #include "php_simplexml.h"
00027 
00028 #define SKIP_TEXT(__p) \
00029        if ((__p)->type == XML_TEXT_NODE) { \
00030               goto next_iter; \
00031        }
00032 
00033 #define GET_NODE(__s, __n) { \
00034        if ((__s)->node && (__s)->node->node) { \
00035               __n = (__s)->node->node; \
00036        } else { \
00037               __n = NULL; \
00038               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Node no longer exists"); \
00039        } \
00040 }
00041 
00042 PHP_SXE_API zend_object_value sxe_object_new(zend_class_entry *ce TSRMLS_DC);
00043 /* {{{ php_sxe_fetch_object()
00044  */
00045 static inline php_sxe_object *
00046 php_sxe_fetch_object(zval *object TSRMLS_DC)
00047 {
00048        return (php_sxe_object *) zend_object_store_get_object(object TSRMLS_CC);
00049 }
00050 /* }}} */
00051 
00052 typedef struct {
00053        zend_object_iterator  intern;
00054        php_sxe_object        *sxe;
00055 } php_sxe_iterator;
00056 
00057 #endif /* PHP_SIMPLEXML_EXPORTS_H */
00058