Skip to content

Commit 5d983e7

Browse files
committed
docs: zend_extension::module_entry
1 parent e835bed commit 5d983e7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Zend/zend_extensions.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,18 @@ struct _zend_extension {
102102
int (*build_id_check)(const char* build_id);
103103
op_array_persist_calc_func_t op_array_persist_calc;
104104
op_array_persist_func_t op_array_persist;
105+
106+
/* Setting a module_entry indicates a hybrid extension, meaning an
107+
* extension which is also a module. Such extensions can be loaded with
108+
* either "zend_extension=<name>" or "extension=<name>" by INI.
109+
*
110+
* The symbol "get_module" must _not_ be exported, i.e. don't call
111+
* ZEND_GET_MODULE(), and instead use ZEND_MODULE_ENTRY() to assign a value
112+
* to `.module_entry`.
113+
*
114+
* The DL_HANDLE is owned by the zend_extension for hybrid extensions, so
115+
* the handle should be null for the module entry.
116+
*/
105117
zend_module_entry *module_entry;
106118
void *reserved6;
107119
void *reserved7;

0 commit comments

Comments
 (0)