root/trunk/php_fastxsl.h

Revision 18, 3.0 kB (checked in by george, 12 years ago)

friendster changes. numerous stability fixes.

Line 
1 /*
2   +----------------------------------------------------------------------+
3   | PHP Version 4                                                        |
4   +----------------------------------------------------------------------+
5   | Copyright (c) 1997-2003 The PHP Group                                |
6   +----------------------------------------------------------------------+
7   | This source file is subject to version 2.02 of the PHP license,      |
8   | that is bundled with this package in the file LICENSE, and is        |
9   | available at through the world-wide-web at                           |
10   | http://www.php.net/license/2_02.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   |         George Schlossnagle <george@omniti.com>                      |
17   +----------------------------------------------------------------------+
18
19   $Id: php_fastxsl.h,v 1.1.1.1 2004/02/17 23:31:44 sterling Exp $
20 */
21
22 #include "php.h"
23
24 #ifndef PHP_FASTXSL_H
25 #define PHP_FASTXSL_H
26
27 #include <libxml/xmlmemory.h>
28 #include <libxml/debugXML.h>
29 #include <libxml/HTMLtree.h>
30 #include <libxml/xmlIO.h>
31 #include <libxml/xinclude.h>
32 #include <libxml/catalog.h>
33 #include <libxslt/xslt.h>
34 #include <libxslt/xsltInternals.h>
35 #include <libxslt/transform.h>
36 #include <libxslt/xsltutils.h>
37
38 #if HAVE_DOMEXSLT
39 #include <libexslt/exslt.h>
40 #include <libexslt/exsltconfig.h>
41 #endif
42
43 #ifdef FASTXSL_MM
44 #include <mm.h>
45 #endif
46
47 #include <sys/types.h>
48 #include <unistd.h>
49
50 #include "fl_hash.h"
51
52 extern zend_module_entry fastxsl_module_entry;
53 #define phpext_fastxsl_ptr &fastxsl_module_entry
54
55 #ifdef PHP_WIN32
56 #define PHP_FASTXSL_API __declspec(dllexport)
57 #else
58 #define PHP_FASTXSL_API
59 #endif
60
61 #ifdef ZTS
62 #include "TSRM.h"
63 #endif
64
65 PHP_MINIT_FUNCTION(fastxsl);
66 PHP_MSHUTDOWN_FUNCTION(fastxsl);
67 PHP_RINIT_FUNCTION(fastxsl);
68 PHP_RSHUTDOWN_FUNCTION(fastxsl);
69 PHP_MINFO_FUNCTION(fastxsl);
70
71 #define FASTXSL_PRMALLOC 0
72 #define FASTXSL_SHMALLOC 1
73
74 typedef struct {
75 #ifdef FASTXSL_MM
76         MM   *mm;
77 #endif
78         FL_Hash *table;
79         pid_t owner;
80         FL_Hash *prmtable;
81 } fl_cache;
82
83 typedef struct {
84         xmlDocPtr xd;
85         int alloc_type;
86 } php_xd_wrapper;
87
88 typedef struct {
89         xsltStylesheetPtr ss;
90         int allocsize;
91         time_t mtime;
92         int hits;
93         int persistant;
94         int alloc_type;
95 } php_ss_wrapper;
96
97 typedef struct {
98         fl_cache *cache;
99         char     *shmpath;
100         char     *errbuf;
101         long      nostat;
102         long      register_functions;
103         long      tmp_allocated_size;
104         void     ***pool;
105         int      *pool_offset;
106         int      *pool_allocd;
107 } zend_fastxsl_globals;
108
109 #ifdef ZTS
110 #define FASTXSL_G(v) TSRMG(fastxsl_globals_id, zend_fastxsl_globals *, v)
111 #else
112 #define FASTXSL_G(v) (fastxsl_globals.v)
113 #endif
114
115 #endif
116
117
118 /*
119  * Local variables:
120  * tab-width: 4
121  * c-basic-offset: 4
122  * indent-tabs-mode: t
123  * End:
124  */
Note: See TracBrowser for help on using the browser.