Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 134 lines (102 sloc) 4.608 kb
573b460 @andigutmans Zend Library
andigutmans authored
1 /*
2 +----------------------------------------------------------------------+
3 | Zend Engine |
4 +----------------------------------------------------------------------+
8775a37 @felipensp - Year++
felipensp authored
5 | Copyright (c) 1998-2012 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, |
637a404 - MFH as discussed
Marcus Boerger authored
8 | that is bundled with this package in the file LICENSE, and is |
f68c7ff updating license information in the headers.
James Cox authored
9 | available through the world-wide-web at the following url: |
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
333406b - Added some missing CVS $Id$ tags, headers and footers.
foobar authored
20 /* $Id$ */
b5b1117 @zsuraski License update
zsuraski authored
21
b982307 Change header protection macros to conform to standard.
Sascha Schumann authored
22 #ifndef ZEND_EXTENSIONS_H
23 #define ZEND_EXTENSIONS_H
573b460 @andigutmans Zend Library
andigutmans authored
24
25 #include "zend_compile.h"
5d8c9f8 @smalyshev Build IDs
smalyshev authored
26 #include "zend_build.h"
573b460 @andigutmans Zend Library
andigutmans authored
27
4774563 @andigutmans - Add comment
andigutmans authored
28 /* The first number is the engine version and the rest is the date.
637a404 - MFH as discussed
Marcus Boerger authored
29 * This way engine 2/3 API no. is always greater than engine 1 API no..
4774563 @andigutmans - Add comment
andigutmans authored
30 */
f7ce695 - Interned string related callbacks moved turned from compiler_global…
Dmitry Stogov authored
31 #define ZEND_EXTENSION_API_NO 220100525
573b460 @andigutmans Zend Library
andigutmans authored
32
1250c43 @zsuraski * Add struct name to all typedef's so that they can be debugged with …
zsuraski authored
33 typedef struct _zend_extension_version_info {
573b460 @andigutmans Zend Library
andigutmans authored
34 int zend_extension_api_no;
5d8c9f8 @smalyshev Build IDs
smalyshev authored
35 char *build_id;
573b460 @andigutmans Zend Library
andigutmans authored
36 } zend_extension_version_info;
37
5d8c9f8 @smalyshev Build IDs
smalyshev authored
38 #define ZEND_EXTENSION_BUILD_ID "API" ZEND_TOSTR(ZEND_EXTENSION_API_NO) ZEND_BUILD_TS ZEND_BUILD_DEBUG ZEND_BUILD_SYSTEM ZEND_BUILD_EXTRA
573b460 @andigutmans Zend Library
andigutmans authored
39
40 typedef struct _zend_extension zend_extension;
41
4004ef6 @andigutmans - Use typedef's for function pointers so that we can easily define ar…
andigutmans authored
42 /* Typedef's for zend_extension function pointers */
43 typedef int (*startup_func_t)(zend_extension *extension);
44 typedef void (*shutdown_func_t)(zend_extension *extension);
dd7eb42 fix a couple of warnings
Thies C. Arntzen authored
45 typedef void (*activate_func_t)(void);
46 typedef void (*deactivate_func_t)(void);
4004ef6 @andigutmans - Use typedef's for function pointers so that we can easily define ar…
andigutmans authored
47
48 typedef void (*message_handler_func_t)(int message, void *arg);
49
50 typedef void (*op_array_handler_func_t)(zend_op_array *op_array);
51
52 typedef void (*statement_handler_func_t)(zend_op_array *op_array);
53 typedef void (*fcall_begin_handler_func_t)(zend_op_array *op_array);
54 typedef void (*fcall_end_handler_func_t)(zend_op_array *op_array);
55
56 typedef void (*op_array_ctor_func_t)(zend_op_array *op_array);
57 typedef void (*op_array_dtor_func_t)(zend_op_array *op_array);
58
573b460 @andigutmans Zend Library
andigutmans authored
59 struct _zend_extension {
60 char *name;
61 char *version;
62 char *author;
63 char *URL;
64 char *copyright;
65
4004ef6 @andigutmans - Use typedef's for function pointers so that we can easily define ar…
andigutmans authored
66 startup_func_t startup;
67 shutdown_func_t shutdown;
68 activate_func_t activate;
69 deactivate_func_t deactivate;
70
71 message_handler_func_t message_handler;
573b460 @andigutmans Zend Library
andigutmans authored
72
4004ef6 @andigutmans - Use typedef's for function pointers so that we can easily define ar…
andigutmans authored
73 op_array_handler_func_t op_array_handler;
8aac6e7 @zsuraski - Add zend_llist_apply_with_arguments()
zsuraski authored
74
637a404 - MFH as discussed
Marcus Boerger authored
75 statement_handler_func_t statement_handler;
4004ef6 @andigutmans - Use typedef's for function pointers so that we can easily define ar…
andigutmans authored
76 fcall_begin_handler_func_t fcall_begin_handler;
77 fcall_end_handler_func_t fcall_end_handler;
573b460 @andigutmans Zend Library
andigutmans authored
78
4004ef6 @andigutmans - Use typedef's for function pointers so that we can easily define ar…
andigutmans authored
79 op_array_ctor_func_t op_array_ctor;
80 op_array_dtor_func_t op_array_dtor;
573b460 @andigutmans Zend Library
andigutmans authored
81
4004ef6 @andigutmans - Use typedef's for function pointers so that we can easily define ar…
andigutmans authored
82 int (*api_no_check)(int api_no);
7a1cca3 Added ability to check build_id by extension
Dmitry Stogov authored
83 int (*build_id_check)(const char* build_id);
573b460 @andigutmans Zend Library
andigutmans authored
84 void *reserved3;
85 void *reserved4;
86 void *reserved5;
87 void *reserved6;
88 void *reserved7;
89 void *reserved8;
90
91 DL_HANDLE handle;
92 int resource_number;
93 };
94
3a3f95a wrap ZEND_API prototypes into BEGIN_EXTERN_C/END_EXTERN_C
Hartmut Holzgraefe authored
95 BEGIN_EXTERN_C()
9353650 Fix warnings surfacing in maintainer-mode.
Stig S. Bakken authored
96 ZEND_API int zend_get_resource_handle(zend_extension *extension);
8aac6e7 @zsuraski - Add zend_llist_apply_with_arguments()
zsuraski authored
97 ZEND_API void zend_extension_dispatch_message(int message, void *arg);
3a3f95a wrap ZEND_API prototypes into BEGIN_EXTERN_C/END_EXTERN_C
Hartmut Holzgraefe authored
98 END_EXTERN_C()
8aac6e7 @zsuraski - Add zend_llist_apply_with_arguments()
zsuraski authored
99
100 #define ZEND_EXTMSG_NEW_EXTENSION 1
573b460 @andigutmans Zend Library
andigutmans authored
101
102
103 #define ZEND_EXTENSION() \
cf84f2c @johannes MFH Fix Zend extensions
johannes authored
104 ZEND_EXT_API zend_extension_version_info extension_version_info = { ZEND_EXTENSION_API_NO, ZEND_EXTENSION_BUILD_ID }
573b460 @andigutmans Zend Library
andigutmans authored
105
e27be1e @smalyshev add utility macro
smalyshev authored
106 #define STANDARD_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
107 #define COMPAT_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
108 #define BUILD_COMPAT_ZEND_EXTENSION_PROPERTIES NULL, NULL, NULL, NULL, NULL, NULL, NULL, -1
573b460 @andigutmans Zend Library
andigutmans authored
109
110
111 ZEND_API extern zend_llist zend_extensions;
112
113 void zend_extension_dtor(zend_extension *extension);
cf7384a @felipensp - MFH: Constness (Added const qualifier to several function parameters)
felipensp authored
114 void zend_append_version_info(const zend_extension *extension);
309827e @zsuraski Fix previous update - move extension startup further down the startup…
zsuraski authored
115 int zend_startup_extensions_mechanism(void);
ddbcbb6 @zsuraski Fix a bug in the resource dispencer
zsuraski authored
116 int zend_startup_extensions(void);
d76cf1d @zsuraski More TSRMLS_FETCH work
zsuraski authored
117 void zend_shutdown_extensions(TSRMLS_D);
3a3f95a wrap ZEND_API prototypes into BEGIN_EXTERN_C/END_EXTERN_C
Hartmut Holzgraefe authored
118
119 BEGIN_EXTERN_C()
cf7384a @felipensp - MFH: Constness (Added const qualifier to several function parameters)
felipensp authored
120 ZEND_API int zend_load_extension(const char *path);
3a3f95a wrap ZEND_API prototypes into BEGIN_EXTERN_C/END_EXTERN_C
Hartmut Holzgraefe authored
121 ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
cf7384a @felipensp - MFH: Constness (Added const qualifier to several function parameters)
felipensp authored
122 ZEND_API zend_extension *zend_get_extension(const char *extension_name);
3a3f95a wrap ZEND_API prototypes into BEGIN_EXTERN_C/END_EXTERN_C
Hartmut Holzgraefe authored
123 END_EXTERN_C()
573b460 @andigutmans Zend Library
andigutmans authored
124
b982307 Change header protection macros to conform to standard.
Sascha Schumann authored
125 #endif /* ZEND_EXTENSIONS_H */
333406b - Added some missing CVS $Id$ tags, headers and footers.
foobar authored
126
127 /*
128 * Local variables:
129 * tab-width: 4
130 * c-basic-offset: 4
131 * indent-tabs-mode: t
132 * End:
133 */
Something went wrong with that request. Please try again.