Skip to content

Remove useless code in ext-enchant #16940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions ext/enchant/enchant.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ zend_module_entry enchant_module_entry = {
"enchant",
ext_functions,
PHP_MINIT(enchant),
PHP_MSHUTDOWN(enchant),
NULL,
NULL, /* Replace with NULL if there's nothing to do at request start */
NULL, /* Replace with NULL if there's nothing to do at request end */
PHP_MINFO(enchant),
Expand Down Expand Up @@ -213,13 +213,6 @@ PHP_MINIT_FUNCTION(enchant)
}
/* }}} */

/* {{{ PHP_MSHUTDOWN_FUNCTION */
PHP_MSHUTDOWN_FUNCTION(enchant)
{
return SUCCESS;
}
/* }}} */

static void __enumerate_providers_fn (const char * const name,
const char * const desc,
const char * const file,
Expand Down Expand Up @@ -353,13 +346,11 @@ PHP_FUNCTION(enchant_broker_set_dict_path)

switch (dict_type) {
case PHP_ENCHANT_MYSPELL:
PHP_ENCHANT_GET_BROKER;
enchant_broker_set_param(pbroker->pbroker, "enchant.myspell.dictionary.path", (const char *)value);
RETURN_TRUE;
break;

case PHP_ENCHANT_ISPELL:
PHP_ENCHANT_GET_BROKER;
enchant_broker_set_param(pbroker->pbroker, "enchant.ispell.dictionary.path", (const char *)value);
RETURN_TRUE;
break;
Expand Down Expand Up @@ -389,12 +380,10 @@ PHP_FUNCTION(enchant_broker_get_dict_path)

switch (dict_type) {
case PHP_ENCHANT_MYSPELL:
PHP_ENCHANT_GET_BROKER;
value = enchant_broker_get_param(pbroker->pbroker, "enchant.myspell.dictionary.path");
break;

case PHP_ENCHANT_ISPELL:
PHP_ENCHANT_GET_BROKER;
value = enchant_broker_get_param(pbroker->pbroker, "enchant.ispell.dictionary.path");
break;

Expand Down