xref: /PHP-5.5/ext/xmlreader/php_xmlreader.h (revision 73c1be26)
1 /*
2   +----------------------------------------------------------------------+
3   | PHP Version 5                                                        |
4   +----------------------------------------------------------------------+
5   | Copyright (c) 1997-2015 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: Rob Richards <rrichards@php.net>                             |
16   +----------------------------------------------------------------------+
17 */
18 
19 /* $Id$ */
20 
21 #ifndef PHP_XMLREADER_H
22 #define PHP_XMLREADER_H
23 
24 extern zend_module_entry xmlreader_module_entry;
25 #define phpext_xmlreader_ptr &xmlreader_module_entry
26 
27 #ifdef ZTS
28 #include "TSRM.h"
29 #endif
30 
31 #include "ext/libxml/php_libxml.h"
32 #include <libxml/xmlreader.h>
33 
34 typedef struct _xmlreader_object {
35 	zend_object  std;
36 	xmlTextReaderPtr ptr;
37 	/* strings must be set in input buffer as copy is required */
38 	xmlParserInputBufferPtr input;
39 	void *schema;
40 	HashTable *prop_handler;
41 	zend_object_handle handle;
42 } xmlreader_object;
43 
44 PHP_MINIT_FUNCTION(xmlreader);
45 PHP_MSHUTDOWN_FUNCTION(xmlreader);
46 PHP_MINFO_FUNCTION(xmlreader);
47 
48 #define REGISTER_XMLREADER_CLASS_CONST_LONG(const_name, value) \
49 	zend_declare_class_constant_long(xmlreader_class_entry, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC);
50 
51 #ifdef ZTS
52 #define XMLREADER_G(v) TSRMG(xmlreader_globals_id, zend_xmlreader_globals *, v)
53 #else
54 #define XMLREADER_G(v) (xmlreader_globals.v)
55 #endif
56 
57 #endif	/* PHP_XMLREADER_H */
58 
59 /*
60  * Local variables:
61  * tab-width: 4
62  * c-basic-offset: 4
63  * End:
64  * vim600: noet sw=4 ts=4 fdm=marker
65  * vim<600: noet sw=4 ts=4
66  */
67