Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 92 lines (74 sloc) 3.403 kb
573b460 @andigutmans Zend Library
andigutmans authored
1 /*
2 +----------------------------------------------------------------------+
3 | Zend Engine |
4 +----------------------------------------------------------------------+
2c5d4b8 Bump year.
Sebastian Bergmann authored
5 | Copyright (c) 1998-2003 Zend Technologies Ltd. (http://www.zend.com) |
573b460 @andigutmans Zend Library
andigutmans authored
6 +----------------------------------------------------------------------+
d863d52 Update headers.
Sebastian Bergmann authored
7 | This source file is subject to version 2.00 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 |
d863d52 Update headers.
Sebastian Bergmann authored
10 | http://www.zend.com/license/2_00.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
7513a2f @andigutmans - Fix dll linkage warnings
andigutmans authored
24 #include "zend.h"
25
2c254ba @zsuraski Get rid of ELS_*(), and use TSRMLS_*() instead.
zsuraski authored
26 #define INIT_FUNC_ARGS int type, int module_number TSRMLS_DC
27 #define INIT_FUNC_ARGS_PASSTHRU type, module_number TSRMLS_CC
e8ac55d @zsuraski More TSRMLS_FETCH work
zsuraski authored
28 #define SHUTDOWN_FUNC_ARGS int type, int module_number TSRMLS_DC
29 #define SHUTDOWN_FUNC_ARGS_PASSTHRU type, module_number TSRMLS_CC
30 #define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module TSRMLS_DC
31 #define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module TSRMLS_CC
573b460 @andigutmans Zend Library
andigutmans authored
32
0bed994 @andigutmans - Add exports from Daniel Beulshausen
andigutmans authored
33 ZEND_API extern unsigned char first_arg_force_ref[];
34 ZEND_API extern unsigned char second_arg_force_ref[];
b525549 @zsuraski More TSRMLS_FETCH work, and get rid of redundant ParametersPassedByRef
zsuraski authored
35 ZEND_API extern unsigned char third_arg_force_ref[];
05cf442 @zsuraski -
zsuraski authored
36
bf4e594 - MFZE1
Derick Rethans authored
37 #define ZEND_MODULE_API_NO 20020429
3bd9e02 @andigutmans - Save ZEND_DEBUG, ZTS, ZEND_API information
andigutmans authored
38 #ifdef ZTS
39 #define USING_ZTS 1
40 #else
41 #define USING_ZTS 0
42 #endif
43
814045b added zend_ini_entry to zend_modules_entry as
Harald Radi authored
44 #define STANDARD_MODULE_HEADER sizeof(zend_module_entry), ZEND_MODULE_API_NO, ZEND_DEBUG, USING_ZTS, NULL
45 #define ZE2_STANDARD_MODULE_HEADER sizeof(zend_module_entry), ZEND_MODULE_API_NO, ZEND_DEBUG, USING_ZTS, &ini_entries
0185071 MFZE1: Introduced extension version numbers (Stig)
Sebastian Bergmann authored
46
47 #define STANDARD_MODULE_PROPERTIES_EX 0, 0, 0, NULL, 0
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
0185071 MFZE1: Introduced extension version numbers (Stig)
Sebastian Bergmann authored
52 #define NO_VERSION_YET NULL
53
573b460 @andigutmans Zend Library
andigutmans authored
54 #define MODULE_PERSISTENT 1
55 #define MODULE_TEMPORARY 2
56
2f7f1dd #@!$$grml*$%
Harald Radi authored
57 struct _zend_ini_entry;
bfbe861 @zsuraski Almost forgot to commit those
zsuraski authored
58 typedef struct _zend_module_entry zend_module_entry;
59
60 struct _zend_module_entry {
0185071 MFZE1: Introduced extension version numbers (Stig)
Sebastian Bergmann authored
61 unsigned short size;
62 unsigned int zend_api;
63 unsigned char zend_debug;
64 unsigned char zts;
2f7f1dd #@!$$grml*$%
Harald Radi authored
65 struct _zend_ini_entry *ini_entry;
573b460 @andigutmans Zend Library
andigutmans authored
66 char *name;
342c6e0 @zsuraski Whatnot:
zsuraski authored
67 zend_function_entry *functions;
573b460 @andigutmans Zend Library
andigutmans authored
68 int (*module_startup_func)(INIT_FUNC_ARGS);
9d8e0db @zsuraski * Add arguments to shutdown functions
zsuraski authored
69 int (*module_shutdown_func)(SHUTDOWN_FUNC_ARGS);
573b460 @andigutmans Zend Library
andigutmans authored
70 int (*request_startup_func)(INIT_FUNC_ARGS);
9d8e0db @zsuraski * Add arguments to shutdown functions
zsuraski authored
71 int (*request_shutdown_func)(SHUTDOWN_FUNC_ARGS);
bfbe861 @zsuraski Almost forgot to commit those
zsuraski authored
72 void (*info_func)(ZEND_MODULE_INFO_FUNC_ARGS);
0185071 MFZE1: Introduced extension version numbers (Stig)
Sebastian Bergmann authored
73 char *version;
690575e Add global startup/shutdown functions
Sascha Schumann authored
74 int (*global_startup_func)(void);
75 int (*global_shutdown_func)(void);
9e2fb7b @zsuraski Use int
zsuraski authored
76 int globals_id;
94b5119 @zsuraski Remove request_started, increase thread safety
zsuraski authored
77 int module_started;
573b460 @andigutmans Zend Library
andigutmans authored
78 unsigned char type;
79 void *handle;
80 int module_number;
bfbe861 @zsuraski Almost forgot to commit those
zsuraski authored
81 };
573b460 @andigutmans Zend Library
andigutmans authored
82
83
2946f87 @andigutmans - Fix new -m on Windows
andigutmans authored
84 extern ZEND_API HashTable module_registry;
573b460 @andigutmans Zend Library
andigutmans authored
85
3feb4b3 @zsuraski Add new API for resources
zsuraski authored
86 void module_destructor(zend_module_entry *module);
d76cf1d @zsuraski More TSRMLS_FETCH work
zsuraski authored
87 int module_registry_cleanup(zend_module_entry *module TSRMLS_DC);
88 int module_registry_request_startup(zend_module_entry *module TSRMLS_DC);
573b460 @andigutmans Zend Library
andigutmans authored
89
62114c1 @zsuraski Destructors no longer return ints, the low level problem it was intended...
zsuraski authored
90 #define ZEND_MODULE_DTOR (void (*)(void *)) module_destructor
573b460 @andigutmans Zend Library
andigutmans authored
91 #endif
Something went wrong with that request. Please try again.