summaryrefslogtreecommitdiff
path: root/ext/recode/recode.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/recode/recode.c')
-rw-r--r--ext/recode/recode.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/recode/recode.c b/ext/recode/recode.c
index da4bcb1ba3..f1b556ff2f 100644
--- a/ext/recode/recode.c
+++ b/ext/recode/recode.c
@@ -74,7 +74,8 @@ ZEND_GET_MODULE(recode)
PHP_MINIT_FUNCTION(recode)
{
- ReSLS_FETCH();
+ TSRMLS_FETCH();
+
ReSG(outer) = recode_new_outer(true);
if (ReSG(outer) == NULL)
return FAILURE;
@@ -85,7 +86,7 @@ PHP_MINIT_FUNCTION(recode)
PHP_MSHUTDOWN_FUNCTION(recode)
{
- ReSLS_FETCH();
+ TSRMLS_FETCH();
if (ReSG(outer))
recode_delete_outer(ReSG(outer));
@@ -96,7 +97,7 @@ PHP_MSHUTDOWN_FUNCTION(recode)
PHP_MINFO_FUNCTION(recode)
{
- ReSLS_FETCH();
+ TSRMLS_FETCH();
php_info_print_table_start();
php_info_print_table_row(2, "Recode Support", "enabled");
@@ -116,8 +117,7 @@ PHP_FUNCTION(recode_string)
pval **req;
bool success;
int r_len=0, r_alen =0;
-
- ReSLS_FETCH();
+
if (ZEND_NUM_ARGS() != 2
|| zend_get_parameters_ex(2, &req, &str) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -169,7 +169,6 @@ PHP_FUNCTION(recode_file)
FILE *in_fp, *out_fp;
int in_type, out_type;
- ReSLS_FETCH();
if (ZEND_NUM_ARGS() != 3
|| zend_get_parameters_ex(3, &req, &input, &output) == FAILURE) {
WRONG_PARAM_COUNT;