Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 79 lines (64 sloc) 2.854 kb
573b460 andigutmans Zend Library
andigutmans authored
1 /*
2 +----------------------------------------------------------------------+
3 | Zend Engine |
4 +----------------------------------------------------------------------+
5e55e47 Zeev Suraski It's official now...
zsuraski authored
5 | Copyright (c) 1998-2000 Zend Technologies Ltd. (http://www.zend.com) |
573b460 andigutmans Zend Library
andigutmans authored
6 +----------------------------------------------------------------------+
5e55e47 Zeev Suraski It's official now...
zsuraski authored
7 | This source file is subject to version 0.92 of the Zend license, |
b5b1117 Zeev Suraski License update
zsuraski authored
8 | that is bundled with this package in the file LICENSE, and is |
9 | available at through the world-wide-web at |
5e55e47 Zeev Suraski It's official now...
zsuraski authored
10 | http://www.zend.com/license/0_92.txt. |
b5b1117 Zeev Suraski License update
zsuraski authored
11 | If you did not receive a copy of the Zend license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@zend.com so we can mail you a copy immediately. |
573b460 andigutmans Zend Library
andigutmans authored
14 +----------------------------------------------------------------------+
15 | Authors: Andi Gutmans <andi@zend.com> |
16 | Zeev Suraski <zeev@zend.com> |
17 +----------------------------------------------------------------------+
18 */
19
b5b1117 Zeev Suraski License update
zsuraski authored
20
573b460 andigutmans Zend Library
andigutmans authored
21 #ifndef _MODULES_H
22 #define _MODULES_H
23
9f51f15 Zeev Suraski - Stop passing list/plist to internal functions
zsuraski authored
24 #define INIT_FUNC_ARGS int type, int module_number ELS_DC
25 #define INIT_FUNC_ARGS_PASSTHRU type, module_number ELS_CC
9d8e0db Zeev Suraski * Add arguments to shutdown functions
zsuraski authored
26 #define SHUTDOWN_FUNC_ARGS int type, int module_number
5d4579a added INIT_FUNC_ARGS_PASSTHRU and SHUTDOWN_FUNC_ARGS_PASSTHRU
Stig S. Bakken authored
27 #define SHUTDOWN_FUNC_ARGS_PASSTHRU type, module_number
14a8e9b Zeev Suraski Change argument name
zsuraski authored
28 #define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module
4562f7b Added ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU.
Stig S. Bakken authored
29 #define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module
b6bc7dc added GINIT_FUNC_ARGS and GINIT_FUNC_ARGS_PASSTHRU
Stig S. Bakken authored
30 #define GINIT_FUNC_ARGS void
31 #define GINIT_FUNC_ARGS_PASSTHRU
573b460 andigutmans Zend Library
andigutmans authored
32
3bd9e02 andigutmans - Save ZEND_DEBUG, ZTS, ZEND_API information
andigutmans authored
33 #include "zend.h"
34
35 #ifdef ZTS
36 #define USING_ZTS 1
37 #else
38 #define USING_ZTS 0
39 #endif
40
41 #define STANDARD_MODULE_PROPERTIES_EX 0, 0, NULL, 0, ZEND_DEBUG, USING_ZTS, ZEND_API
573b460 andigutmans Zend Library
andigutmans authored
42
690575e Add global startup/shutdown functions
Sascha Schumann authored
43 #define STANDARD_MODULE_PROPERTIES \
44 NULL, NULL, STANDARD_MODULE_PROPERTIES_EX
573b460 andigutmans Zend Library
andigutmans authored
45
46 #define MODULE_PERSISTENT 1
47 #define MODULE_TEMPORARY 2
48
bfbe861 Zeev Suraski Almost forgot to commit those
zsuraski authored
49 typedef struct _zend_module_entry zend_module_entry;
50
51 struct _zend_module_entry {
573b460 andigutmans Zend Library
andigutmans authored
52 char *name;
342c6e0 Zeev Suraski Whatnot:
zsuraski authored
53 zend_function_entry *functions;
573b460 andigutmans Zend Library
andigutmans authored
54 int (*module_startup_func)(INIT_FUNC_ARGS);
9d8e0db Zeev Suraski * Add arguments to shutdown functions
zsuraski authored
55 int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
573b460 andigutmans Zend Library
andigutmans authored
56 int (*request_startup_func)(INIT_FUNC_ARGS);
9d8e0db Zeev Suraski * Add arguments to shutdown functions
zsuraski authored
57 int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
bfbe861 Zeev Suraski Almost forgot to commit those
zsuraski authored
58 void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
690575e Add global startup/shutdown functions
Sascha Schumann authored
59 int (*global_startup_func)(void);
60 int (*global_shutdown_func)(void);
94b5119 Zeev Suraski Remove request_started, increase thread safety
zsuraski authored
61 int module_started;
573b460 andigutmans Zend Library
andigutmans authored
62 unsigned char type;
63 void *handle;
64 int module_number;
3bd9e02 andigutmans - Save ZEND_DEBUG, ZTS, ZEND_API information
andigutmans authored
65 unsigned char zend_debug;
66 unsigned char zts;
67 unsigned int zend_api;
bfbe861 Zeev Suraski Almost forgot to commit those
zsuraski authored
68 };
573b460 andigutmans Zend Library
andigutmans authored
69
70
71 extern HashTable module_registry;
72
3feb4b3 Zeev Suraski Add new API for resources
zsuraski authored
73 void module_destructor(zend_module_entry *module);
74 int module_registry_cleanup(zend_module_entry *module);
75 int module_registry_request_startup(zend_module_entry *module);
573b460 andigutmans Zend Library
andigutmans authored
76
62114c1 Zeev Suraski Destructors no longer return ints, the low level problem it was intended...
zsuraski authored
77 #define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor
573b460 andigutmans Zend Library
andigutmans authored
78 #endif
Something went wrong with that request. Please try again.