summaryrefslogtreecommitdiff
path: root/ext/pspell/pspell.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pspell/pspell.c')
-rw-r--r--ext/pspell/pspell.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c
index cfa848f62c..062697f433 100644
--- a/ext/pspell/pspell.c
+++ b/ext/pspell/pspell.c
@@ -68,11 +68,15 @@ zend_module_entry pspell_module_entry = {
ZEND_GET_MODULE(pspell)
#endif
-static void php_pspell_close(PspellManager *manager){
+static void php_pspell_close(zend_rsrc_list_entry *rsrc)
+{
+ PspellManager *manager = (PspellManager *)rsrc->ptr;
delete_pspell_manager(manager);
}
-static void php_pspell_close_config(PspellConfig *config){
+static void php_pspell_close_config(zend_rsrc_list_entry *rsrc)
+{
+ PspellConfig *config = (PspellConfig *)rsrc->ptr;
delete_pspell_config(config);
}
@@ -81,8 +85,8 @@ PHP_MINIT_FUNCTION(pspell){
REGISTER_MAIN_LONG_CONSTANT("PSPELL_NORMAL", PSPELL_NORMAL, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("PSPELL_BAD_SPELLERS", PSPELL_BAD_SPELLERS, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("PSPELL_RUN_TOGETHER", PSPELL_RUN_TOGETHER, CONST_PERSISTENT | CONST_CS);
- le_pspell = register_list_destructors(php_pspell_close,NULL);
- le_pspell_config = register_list_destructors(php_pspell_close_config,NULL);
+ le_pspell = register_list_destructors(php_pspell_close,NULL,"pspell");
+ le_pspell_config = register_list_destructors(php_pspell_close_config,NULL,"pspell config");
return SUCCESS;
}