This block is stored in the structure zend_module_entry and contains all necessary information to describe the contents of this module to Zend. You can see the internal definition of this module in 例31-2.
例 31-2Internal declaration of zend_module_entry.
In our example, this structure is implemented as follows:
For reference purposes, you can find a list of the macros involved in declared startup and shutdown functions in 表31-3. These are not used in our basic example yet, but will be demonstrated later on. You should make use of these macros to declare your startup and shutdown functions, as these require special arguments to be passed (INIT_FUNC_ARGS and SHUTDOWN_FUNC_ARGS), which are automatically included into the function declaration when using the predefined macros. If you declare your functions manually and the PHP developers decide that a change in the argument list is necessary, you'll have to change your module sources to remain compatible.
表 31-3Macros to Declare Startup and Shutdown Functions