php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_xmlreader.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Author: Rob Richards <rrichards@php.net> |
14 +----------------------------------------------------------------------+
15*/
16
17#ifndef PHP_XMLREADER_H
18#define PHP_XMLREADER_H
19
21#define phpext_xmlreader_ptr &xmlreader_module_entry
22
23#include "php_version.h"
24#define PHP_XMLREADER_VERSION PHP_VERSION
25
26#ifdef ZTS
27#include "TSRM.h"
28#endif
29
31#include <libxml/xmlreader.h>
32
33/* If xmlreader and dom both are compiled statically,
34 no DLL import should be used in xmlreader for dom symbols. */
35#ifdef PHP_WIN32
36# if defined(HAVE_DOM) && !defined(COMPILE_DL_DOM) && !defined(COMPILE_DL_XMLREADER)
37# define DOM_LOCAL_DEFINES 1
38# endif
39#endif
40
41typedef struct _xmlreader_object {
42 xmlTextReaderPtr ptr;
43 /* strings must be set in input buffer as copy is required */
44 xmlParserInputBufferPtr input;
45 void *schema;
48
49static inline xmlreader_object *php_xmlreader_fetch_object(zend_object *obj) {
50 return (xmlreader_object *)((char*)(obj) - XtOffsetOf(xmlreader_object, std));
51}
52
53#define Z_XMLREADER_P(zv) php_xmlreader_fetch_object(Z_OBJ_P((zv)))
54
55PHP_MINIT_FUNCTION(xmlreader);
56PHP_MSHUTDOWN_FUNCTION(xmlreader);
57PHP_MINFO_FUNCTION(xmlreader);
58
59#endif /* PHP_XMLREADER_H */
#define PHP_MSHUTDOWN_FUNCTION
Definition php.h:401
#define PHP_MINIT_FUNCTION
Definition php.h:400
#define PHP_MINFO_FUNCTION
Definition php.h:404
zend_module_entry xmlreader_module_entry
struct _xmlreader_object xmlreader_object
xmlParserInputBufferPtr input
xmlTextReaderPtr ptr
struct _zend_module_entry zend_module_entry
#define XtOffsetOf(s_type, field)
struct _zend_object zend_object