Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 86 lines (70 sloc) 3.106 kB
573b460 @andigutmans Zend Library
andigutmans authored
1 /*
2 +----------------------------------------------------------------------+
3 | Zend Engine |
4 +----------------------------------------------------------------------+
5e55e47 @zsuraski 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 @zsuraski It's official now...
zsuraski authored
7 | This source file is subject to version 0.92 of the Zend license, |
b5b1117 @zsuraski 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 @zsuraski It's official now...
zsuraski authored
10 | http://www.zend.com/license/0_92.txt. |
b5b1117 @zsuraski 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 @zsuraski License update
zsuraski authored
20
b982307 Change header protection macros to conform to standard.
Sascha Schumann authored
21 #ifndef MODULES_H
22 #define MODULES_H
573b460 @andigutmans Zend Library
andigutmans authored
23
9f51f15 @zsuraski - 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 @zsuraski * 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 @zsuraski 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
05cf442 @zsuraski -
zsuraski authored
33 extern unsigned char first_arg_force_ref[];
34 extern unsigned char first_arg_allow_ref[];
35 extern unsigned char second_arg_force_ref[];
36 extern unsigned char second_arg_allow_ref[];
37
cf89b8d @andigutmans - That broke the Win32 build
andigutmans authored
38 #include "zend.h"
3bd9e02 @andigutmans - Save ZEND_DEBUG, ZTS, ZEND_API information
andigutmans authored
39
7dcf456 @zsuraski that too
zsuraski authored
40 #define ZEND_MODULE_API_NO 20000809
3bd9e02 @andigutmans - Save ZEND_DEBUG, ZTS, ZEND_API information
andigutmans authored
41 #ifdef ZTS
42 #define USING_ZTS 1
43 #else
44 #define USING_ZTS 0
45 #endif
46
ef426d4 @zsuraski Have a standard entry for the globals id
zsuraski authored
47 #define STANDARD_MODULE_PROPERTIES_EX 0, 0, 0, NULL, 0, ZEND_DEBUG, USING_ZTS, ZEND_MODULE_API_NO
573b460 @andigutmans Zend Library
andigutmans authored
48
690575e Add global startup/shutdown functions
Sascha Schumann authored
49 #define STANDARD_MODULE_PROPERTIES \
50 NULL, NULL, STANDARD_MODULE_PROPERTIES_EX
573b460 @andigutmans Zend Library
andigutmans authored
51
52 #define MODULE_PERSISTENT 1
53 #define MODULE_TEMPORARY 2
54
bfbe861 @zsuraski Almost forgot to commit those
zsuraski authored
55 typedef struct _zend_module_entry zend_module_entry;
56
57 struct _zend_module_entry {
573b460 @andigutmans Zend Library
andigutmans authored
58 char *name;
342c6e0 @zsuraski Whatnot:
zsuraski authored
59 zend_function_entry *functions;
573b460 @andigutmans Zend Library
andigutmans authored
60 int (*module_startup_func)(INIT_FUNC_ARGS);
9d8e0db @zsuraski * Add arguments to shutdown functions
zsuraski authored
61 int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
573b460 @andigutmans Zend Library
andigutmans authored
62 int (*request_startup_func)(INIT_FUNC_ARGS);
9d8e0db @zsuraski * Add arguments to shutdown functions
zsuraski authored
63 int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
bfbe861 @zsuraski Almost forgot to commit those
zsuraski authored
64 void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
690575e Add global startup/shutdown functions
Sascha Schumann authored
65 int (*global_startup_func)(void);
66 int (*global_shutdown_func)(void);
9e2fb7b @zsuraski Use int
zsuraski authored
67 int globals_id;
94b5119 @zsuraski Remove request_started, increase thread safety
zsuraski authored
68 int module_started;
573b460 @andigutmans Zend Library
andigutmans authored
69 unsigned char type;
70 void *handle;
71 int module_number;
3bd9e02 @andigutmans - Save ZEND_DEBUG, ZTS, ZEND_API information
andigutmans authored
72 unsigned char zend_debug;
73 unsigned char zts;
74 unsigned int zend_api;
bfbe861 @zsuraski Almost forgot to commit those
zsuraski authored
75 };
573b460 @andigutmans Zend Library
andigutmans authored
76
77
2946f87 @andigutmans - Fix new -m on Windows
andigutmans authored
78 extern ZEND_API HashTable module_registry;
573b460 @andigutmans Zend Library
andigutmans authored
79
3feb4b3 @zsuraski Add new API for resources
zsuraski authored
80 void module_destructor(zend_module_entry *module);
81 int module_registry_cleanup(zend_module_entry *module);
82 int module_registry_request_startup(zend_module_entry *module);
573b460 @andigutmans Zend Library
andigutmans authored
83
62114c1 @zsuraski Destructors no longer return ints, the low level problem it was inten…
zsuraski authored
84 #define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor
573b460 @andigutmans Zend Library
andigutmans authored
85 #endif
Something went wrong with that request. Please try again.