summaryrefslogtreecommitdiff
path: root/ext/standard/file.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2001-07-27 10:16:41 +0000
committerZeev Suraski <zeev@php.net>2001-07-27 10:16:41 +0000
commitfe6f8712a439c8b5046a03bca9ce5ae8e75aa4f5 (patch)
treec7bc98cac58386828871aae860f90cac0ebdcf8f /ext/standard/file.c
parent2c254ba762d9392a732d5793b5b193ee6e395f1c (diff)
downloadphp-git-fe6f8712a439c8b5046a03bca9ce5ae8e75aa4f5.tar.gz
- Get rid of ELS_*(), and use TSRMLS_*() instead.
- Move to the new ts_allocate_id() API This patch is *bound* to break some files, as I must have had typos somewhere. If you use any uncommon extension, please try to build it...
Diffstat (limited to 'ext/standard/file.c')
-rw-r--r--ext/standard/file.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 3261e06425..4fa6eccf92 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -168,7 +168,7 @@ PHPAPI int php_file_le_socket(void) /* XXX doe we really want this???? */
}
-static void file_globals_ctor(FLS_D)
+static void file_globals_ctor(FLS_D TSRMLS_DC)
{
zend_hash_init(&FG(ht_fsock_keys), 0, NULL, NULL, 1);
zend_hash_init(&FG(ht_fsock_socks), 0, NULL, (void (*)(void *))php_msock_destroy, 1);
@@ -179,7 +179,7 @@ static void file_globals_ctor(FLS_D)
}
-static void file_globals_dtor(FLS_D)
+static void file_globals_dtor(FLS_D TSRMLS_DC)
{
zend_hash_destroy(&FG(ht_fsock_socks));
zend_hash_destroy(&FG(ht_fsock_keys));
@@ -198,9 +198,9 @@ PHP_MINIT_FUNCTION(file)
#endif
#ifdef ZTS
- file_globals_id = ts_allocate_id(sizeof(php_file_globals), (ts_allocate_ctor) file_globals_ctor, (ts_allocate_dtor) file_globals_dtor);
+ ts_allocate_id(&file_globals_id, sizeof(php_file_globals), (ts_allocate_ctor) file_globals_ctor, (ts_allocate_dtor) file_globals_dtor);
#else
- file_globals_ctor(FLS_C);
+ file_globals_ctor(FLS_C TSRMLS_CC);
#endif
REGISTER_LONG_CONSTANT("SEEK_SET", SEEK_SET, CONST_CS | CONST_PERSISTENT);
@@ -220,8 +220,9 @@ PHP_MSHUTDOWN_FUNCTION(file)
{
#ifndef ZTS
FLS_FETCH();
+ TSRMLS_FETCH();
- file_globals_dtor(FLS_C);
+ file_globals_dtor(FLS_C TSRMLS_CC);
#endif
return SUCCESS;
}