summaryrefslogtreecommitdiff
path: root/ext/recode/recode.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2001-07-28 11:36:37 +0000
committerZeev Suraski <zeev@php.net>2001-07-28 11:36:37 +0000
commitd87cc976e1156b839fc6d4aa6b473a126802b8e3 (patch)
tree8acb068dd7458e1c8df3a7d8ecb87d065990fdb1 /ext/recode/recode.c
parentb4f3b9d3ce9f55cf040fb5aa8f201c64646cab43 (diff)
downloadphp-git-d87cc976e1156b839fc6d4aa6b473a126802b8e3.tar.gz
Redesigned thread safety mechanism - nua nua
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;