php_simplexml_exports.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2016 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Author: Sterling Hughes <sterling@php.net> |
  16. | Marcus Boerger <helly@php.net> |
  17. | Rob Richards <rrichards@php.net> |
  18. +----------------------------------------------------------------------+
  19. */
  20. /* $Id$ */
  21. #ifndef PHP_SIMPLEXML_EXPORTS_H
  22. #define PHP_SIMPLEXML_EXPORTS_H
  23. #include "php_simplexml.h"
  24. #define SKIP_TEXT(__p) \
  25. if ((__p)->type == XML_TEXT_NODE) { \
  26. goto next_iter; \
  27. }
  28. #define GET_NODE(__s, __n) { \
  29. if ((__s)->node && (__s)->node->node) { \
  30. __n = (__s)->node->node; \
  31. } else { \
  32. __n = NULL; \
  33. php_error_docref(NULL TSRMLS_CC, E_WARNING, "Node no longer exists"); \
  34. } \
  35. }
  36. PHP_SXE_API zend_object_value sxe_object_new(zend_class_entry *ce TSRMLS_DC);
  37. /* {{{ php_sxe_fetch_object()
  38. */
  39. static inline php_sxe_object *
  40. php_sxe_fetch_object(zval *object TSRMLS_DC)
  41. {
  42. return (php_sxe_object *) zend_object_store_get_object(object TSRMLS_CC);
  43. }
  44. /* }}} */
  45. typedef struct {
  46. zend_object_iterator intern;
  47. php_sxe_object *sxe;
  48. } php_sxe_iterator;
  49. #endif /* PHP_SIMPLEXML_EXPORTS_H */
  50. /**
  51. * Local Variables:
  52. * c-basic-offset: 4
  53. * tab-width: 4
  54. * indent-tabs-mode: t
  55. * End:
  56. * vim600: fdm=marker
  57. * vim: noet sw=4 ts=4
  58. */