initializers
这个设置允许您提供一个或多个C函数在某些扩展生命周期事件上执行——具体来说,GINIT
(globals
), MINIT
(module
), RINIT
(<0 >0 request</0 >1)。 Check the lifecycle hooks chapter for more information.
{
"initializers": [
{
"globals": [
{
"include": "my/awesome/library.h",
"code": "setup_globals_deps(TSRMLS_C)"
}
],
"module": [
{
"include": "my/awesome/library.h",
"code": "setup_module_deps(TSRMLS_C)"
}
],
"request": [
{
"include": "my/awesome/library.h",
"code": "some_c_function(TSRMLS_C)"
},
{
"include": "my/awful/library.h",
"code": "some_other_c_function(TSRMLS_C)"
}
]
}
]
}