summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/ereg/ereg.c2
-rw-r--r--ext/pcre/php_pcre.c4
-rw-r--r--ext/pgsql/pgsql.c15
-rw-r--r--ext/session/session.c3
-rw-r--r--ext/standard/dir.c2
-rw-r--r--ext/standard/file.c2
-rw-r--r--ext/standard/fsock.c2
-rw-r--r--ext/standard/lcg.c2
-rw-r--r--ext/standard/reg.c2
9 files changed, 9 insertions, 25 deletions
diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c
index d327701af8..58c8fc82f2 100644
--- a/ext/ereg/ereg.c
+++ b/ext/ereg/ereg.c
@@ -105,7 +105,7 @@ static void php_reg_init_globals(php_reg_globals *reg_globals)
static PHP_MINIT_FUNCTION(regex)
{
#ifdef ZTS
- reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), php_reg_init_globals, NULL);
+ reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), (ts_allocate_ctor) php_reg_init_globals, NULL);
#else
php_reg_init_globals(&reg_globals);
#endif
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 1dd70ec31a..7adc62b7a7 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -102,8 +102,8 @@ static PHP_MINIT_FUNCTION(pcre)
#ifdef ZTS
pcre_globals_id = ts_allocate_id(
sizeof(php_pcre_globals),
- _php_pcre_init_globals,
- _php_pcre_shutdown_globals);
+ (ts_allocate_ctor) _php_pcre_init_globals,
+ (ts_allocate_dtor) _php_pcre_shutdown_globals);
#else
zend_hash_init(&PCRE_G(pcre_cache), 0, NULL, _php_free_pcre_cache, 1);
#endif
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 868b1d002f..7c0d9dcefe 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -140,7 +140,7 @@ PHP_MINIT_FUNCTION(pgsql)
ELS_FETCH();
#ifdef ZTS
- pgsql_globals_id = ts_allocate_id(sizeof(php_pgsql_globals), php_pgsql_init_globals, NULL);
+ pgsql_globals_id = ts_allocate_id(sizeof(php_pgsql_globals), (ts_allocate_ctor) php_pgsql_init_globals, NULL);
#else
php_pgsql_init_globals(PGLS_C);
#endif
@@ -633,7 +633,6 @@ void php3_pgsql_get_result_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
int type;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -701,7 +700,6 @@ char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list)
char hashed_oid_key[32];
list_entry *field_type;
char *ret=NULL;
- PGLS_FETCH();
/* try to lookup the type in the resource list */
snprintf(hashed_oid_key,31,"pgsql_oid_%d",(int) oid);
@@ -752,7 +750,6 @@ void php3_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
int type;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &result, &field)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -827,7 +824,6 @@ PHP_FUNCTION(pgsql_field_number)
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
int type;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=2 || getParameters(ht, 2, &result, &field)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -856,7 +852,6 @@ PHP_FUNCTION(pgsql_result)
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
int type,field_offset;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=3 || getParameters(ht, 3, &result, &row, &field)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -908,7 +903,6 @@ static void php3_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
char *element,*field_name;
uint element_len;
PLS_FETCH();
- PGLS_FETCH();
switch (ARG_COUNT(ht)) {
case 2:
@@ -1017,7 +1011,6 @@ void php3_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
int type,field_offset;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=3 || getParameters(ht, 3, &result, &row, &field)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -1085,7 +1078,6 @@ PHP_FUNCTION(pgsql_free_result)
pval *result;
pgsql_result_handle *pg_result;
int type;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -1114,7 +1106,6 @@ PHP_FUNCTION(pgsql_last_oid)
PGresult *pgsql_result;
pgsql_result_handle *pg_result;
int type;
- PGLS_FETCH();
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &result)==FAILURE) {
WRONG_PARAM_COUNT;
@@ -1348,7 +1339,6 @@ PHP_FUNCTION(pgsql_lo_close)
pval *pgsql_lofp;
int id, type;
pgLofp *pgsql;
- PGLS_FETCH();
switch(ARG_COUNT(ht)) {
case 1:
@@ -1388,7 +1378,6 @@ PHP_FUNCTION(pgsql_lo_read)
int id, buf_len, type, nbytes;
char *buf;
pgLofp *pgsql;
- PGLS_FETCH();
switch(ARG_COUNT(ht)) {
case 2:
@@ -1431,7 +1420,6 @@ PHP_FUNCTION(pgsql_lo_write)
int id, buf_len, nbytes, type;
char *buf;
pgLofp *pgsql;
- PGLS_FETCH();
switch(ARG_COUNT(ht)) {
case 2:
@@ -1473,7 +1461,6 @@ PHP_FUNCTION(pgsql_lo_readall)
char buf[8192];
pgLofp *pgsql;
int output=1;
- PGLS_FETCH();
switch(ARG_COUNT(ht)) {
case 1:
diff --git a/ext/session/session.c b/ext/session/session.c
index a09a9ec719..c69da0c04a 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -968,8 +968,6 @@ PHP_FUNCTION(session_unset)
static void php_rinit_session_globals(PSLS_D)
{
- ELS_FETCH();
-
PS(mod) = _php_find_ps_module(INI_STR("session.save_handler") PSLS_CC);
PS(serializer) = \
_php_find_ps_serializer(INI_STR("session.serialize_handler") PSLS_CC);
@@ -1016,7 +1014,6 @@ void _php_session_auto_start(void *data)
PHP_RINIT_FUNCTION(session)
{
PSLS_FETCH();
- PLS_FETCH();
php_rinit_session_globals(PSLS_C);
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index 3717f0899b..4f40dd2d98 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -129,7 +129,7 @@ PHP_MINIT_FUNCTION(dir)
dir_class_entry_ptr = register_internal_class(&dir_class_entry);
#ifdef ZTS
- dir_globals_id = ts_allocate_id(sizeof(php_dir_globals), php_dir_init_globals, NULL);
+ dir_globals_id = ts_allocate_id(sizeof(php_dir_globals), (ts_allocate_ctor) php_dir_init_globals, NULL);
#else
DIR(default_dir) = 0;
#endif
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 60e6eb68fe..df2c2af36a 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -325,7 +325,7 @@ PHP_MINIT_FUNCTION(file)
le_uploads = register_list_destructors(_file_upload_dtor, NULL);
#ifdef ZTS
- file_globals_id = ts_allocate_id(sizeof(php_file_globals), php_file_init_globals, NULL);
+ file_globals_id = ts_allocate_id(sizeof(php_file_globals), (ts_allocate_ctor) php_file_init_globals, NULL);
#else
FIL(fgetss_state) = 0;
FIL(pclose_ret) = 0;
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index deedcc8466..7366859f39 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -731,7 +731,7 @@ static void fsock_globals_dtor(FLS_D)
PHP_MINIT_FUNCTION(fsock)
{
#ifdef ZTS
- fsock_globals_id = ts_allocate_id(sizeof(php_fsock_globals), fsock_globals_ctor, fsock_globals_dtor);
+ fsock_globals_id = ts_allocate_id(sizeof(php_fsock_globals), (ts_allocate_ctor) fsock_globals_ctor, (ts_allocate_dtor) fsock_globals_dtor);
#else
fsock_globals_ctor(FLS_C);
#endif
diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c
index 0f046448e6..4e0d1b4ccc 100644
--- a/ext/standard/lcg.c
+++ b/ext/standard/lcg.c
@@ -72,7 +72,7 @@ static void lcg_init_globals(LCGLS_D)
static int php_minit_lcg(INIT_FUNC_ARGS)
{
#ifdef ZTS
- lcg_globals_id = ts_allocate_id(sizeof(php_lcg_globals), lcg_init_globals, NULL);
+ lcg_globals_id = ts_allocate_id(sizeof(php_lcg_globals), (ts_allocate_ctor) lcg_init_globals, NULL);
#else
lcg_init_globals();
#endif
diff --git a/ext/standard/reg.c b/ext/standard/reg.c
index d327701af8..58c8fc82f2 100644
--- a/ext/standard/reg.c
+++ b/ext/standard/reg.c
@@ -105,7 +105,7 @@ static void php_reg_init_globals(php_reg_globals *reg_globals)
static PHP_MINIT_FUNCTION(regex)
{
#ifdef ZTS
- reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), php_reg_init_globals, NULL);
+ reg_globals_id = ts_allocate_id(sizeof(php_reg_globals), (ts_allocate_ctor) php_reg_init_globals, NULL);
#else
php_reg_init_globals(&reg_globals);
#endif