pub struct ModuleAllocations {
pub functions: Box<[FunctionEntry]>,
pub arg_info: Box<[Box<[ArgInfo]>]>,
pub name: CString,
pub version: CString,
}Expand description
The heap allocations a ModuleEntry points into.
A C extension puts its zend_function_entry[], name and version in
.rodata, so the linker owns them for the life of the process. ext-php-rs
builds them at MINIT from an arbitrary #[php_module] body, so this struct
owns them instead, stored inside the extension’s own StaticModuleEntry.
None of it can be freed. module_destructor walks module->functions
reading fname after MSHUTDOWN for dl()-loaded modules,
get_extension_funcs() walks it during a request, and
zend_register_functions keeps zend_internal_function.arg_info pointing
into arg_info for the whole process.
Fields§
§functions: Box<[FunctionEntry]>The module’s function table, NUL-terminated.
arg_info: Box<[Box<[ArgInfo]>]>Argument info of each module function, one table per function.
name: CStringThe module name handed to PHP.
version: CStringThe module version handed to PHP.