summaryrefslogtreecommitdiff
path: root/ext/standard/browscap.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/browscap.c')
-rw-r--r--ext/standard/browscap.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c
index 2ea837ff60..19d340a9d8 100644
--- a/ext/standard/browscap.c
+++ b/ext/standard/browscap.c
@@ -136,7 +136,7 @@ static void convert_browscap_pattern(zval *pattern, int persistent) /* {{{ */
}
/* }}} */
-static void php_browscap_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg TSRMLS_DC) /* {{{ */
+static void php_browscap_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg) /* {{{ */
{
browser_data *bdata = arg;
int persistent = bdata->htab->u.flags & HASH_FLAG_PERSISTENT;
@@ -219,7 +219,7 @@ static void php_browscap_parser_cb(zval *arg1, zval *arg2, zval *arg3, int callb
}
/* }}} */
-static int browscap_read_file(char *filename, browser_data *browdata, int persistent TSRMLS_DC) /* {{{ */
+static int browscap_read_file(char *filename, browser_data *browdata, int persistent) /* {{{ */
{
zend_file_handle fh = {{0}};
@@ -251,7 +251,7 @@ static int browscap_read_file(char *filename, browser_data *browdata, int persis
fh.type = ZEND_HANDLE_FP;
browdata->current_section_name = NULL;
zend_parse_ini_file(&fh, 1, ZEND_INI_SCANNER_RAW,
- (zend_ini_parser_cb_t) php_browscap_parser_cb, browdata TSRMLS_CC);
+ (zend_ini_parser_cb_t) php_browscap_parser_cb, browdata);
if (browdata->current_section_name != NULL) {
pefree(browdata->current_section_name, persistent);
browdata->current_section_name = NULL;
@@ -262,7 +262,7 @@ static int browscap_read_file(char *filename, browser_data *browdata, int persis
/* }}} */
#ifdef ZTS
-static void browscap_globals_ctor(zend_browscap_globals *browscap_globals TSRMLS_DC) /* {{{ */
+static void browscap_globals_ctor(zend_browscap_globals *browscap_globals) /* {{{ */
{
browscap_globals->activation_bdata.htab = NULL;
ZVAL_UNDEF(&browscap_globals->activation_bdata.current_section);
@@ -272,7 +272,7 @@ static void browscap_globals_ctor(zend_browscap_globals *browscap_globals TSRMLS
/* }}} */
#endif
-static void browscap_bdata_dtor(browser_data *bdata, int persistent TSRMLS_DC) /* {{{ */
+static void browscap_bdata_dtor(browser_data *bdata, int persistent) /* {{{ */
{
if (bdata->htab != NULL) {
zend_hash_destroy(bdata->htab);
@@ -294,7 +294,7 @@ PHP_INI_MH(OnChangeBrowscap)
} else if (stage == PHP_INI_STAGE_ACTIVATE) {
browser_data *bdata = &BROWSCAP_G(activation_bdata);
if (bdata->filename[0] != '\0') {
- browscap_bdata_dtor(bdata, 0 TSRMLS_CC);
+ browscap_bdata_dtor(bdata, 0);
}
if (VCWD_REALPATH(new_value->val, bdata->filename) == NULL) {
return FAILURE;
@@ -317,7 +317,7 @@ PHP_MINIT_FUNCTION(browscap) /* {{{ */
/* ctor call not really needed for non-ZTS */
if (browscap && browscap[0]) {
- if (browscap_read_file(browscap, &global_bdata, 1 TSRMLS_CC) == FAILURE) {
+ if (browscap_read_file(browscap, &global_bdata, 1) == FAILURE) {
return FAILURE;
}
}
@@ -330,7 +330,7 @@ PHP_RSHUTDOWN_FUNCTION(browscap) /* {{{ */
{
browser_data *bdata = &BROWSCAP_G(activation_bdata);
if (bdata->filename[0] != '\0') {
- browscap_bdata_dtor(bdata, 0 TSRMLS_CC);
+ browscap_bdata_dtor(bdata, 0);
}
return SUCCESS;
@@ -339,13 +339,13 @@ PHP_RSHUTDOWN_FUNCTION(browscap) /* {{{ */
PHP_MSHUTDOWN_FUNCTION(browscap) /* {{{ */
{
- browscap_bdata_dtor(&global_bdata, 1 TSRMLS_CC);
+ browscap_bdata_dtor(&global_bdata, 1);
return SUCCESS;
}
/* }}} */
-static int browser_reg_compare(zval *browser TSRMLS_DC, int num_args, va_list args, zend_hash_key *key) /* {{{ */
+static int browser_reg_compare(zval *browser, int num_args, va_list args, zend_hash_key *key) /* {{{ */
{
zval *browser_regex, *previous_match;
pcre *re;
@@ -369,7 +369,7 @@ static int browser_reg_compare(zval *browser TSRMLS_DC, int num_args, va_list ar
return 0;
}
- re = pcre_get_compiled_regex(Z_STR_P(browser_regex), &re_extra, &re_options TSRMLS_CC);
+ re = pcre_get_compiled_regex(Z_STR_P(browser_regex), &re_extra, &re_options);
if (re == NULL) {
return 0;
}
@@ -446,30 +446,30 @@ PHP_FUNCTION(get_browser)
if (BROWSCAP_G(activation_bdata).filename[0] != '\0') {
bdata = &BROWSCAP_G(activation_bdata);
if (bdata->htab == NULL) { /* not initialized yet */
- if (browscap_read_file(bdata->filename, bdata, 0 TSRMLS_CC) == FAILURE) {
+ if (browscap_read_file(bdata->filename, bdata, 0) == FAILURE) {
RETURN_FALSE;
}
}
} else {
if (!global_bdata.htab) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "browscap ini directive not set");
+ php_error_docref(NULL, E_WARNING, "browscap ini directive not set");
RETURN_FALSE;
}
bdata = &global_bdata;
}
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!b", &agent_name, &agent_name_len, &return_array) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!b", &agent_name, &agent_name_len, &return_array) == FAILURE) {
return;
}
if (agent_name == NULL) {
zend_string *key = zend_string_init("_SERVER", sizeof("_SERVER") - 1, 0);
- zend_is_auto_global(key TSRMLS_CC);
+ zend_is_auto_global(key);
zend_string_release(key);
if (Z_TYPE(PG(http_globals)[TRACK_VARS_SERVER]) != IS_UNDEF ||
(http_user_agent = zend_hash_str_find(HASH_OF(&PG(http_globals)[TRACK_VARS_SERVER]), "HTTP_USER_AGENT", sizeof("HTTP_USER_AGENT")-1)) == NULL
) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "HTTP_USER_AGENT variable is not set, cannot determine user agent name");
+ php_error_docref(NULL, E_WARNING, "HTTP_USER_AGENT variable is not set, cannot determine user agent name");
RETURN_FALSE;
}
agent_name = Z_STRVAL_P(http_user_agent);
@@ -481,7 +481,7 @@ PHP_FUNCTION(get_browser)
if ((agent = zend_hash_str_find(bdata->htab, lookup_browser_name, agent_name_len)) == NULL) {
ZVAL_UNDEF(&found_browser_entry);
- zend_hash_apply_with_arguments(bdata->htab TSRMLS_CC, browser_reg_compare, 3, lookup_browser_name, agent_name_len, &found_browser_entry);
+ zend_hash_apply_with_arguments(bdata->htab, browser_reg_compare, 3, lookup_browser_name, agent_name_len, &found_browser_entry);
if (Z_TYPE(found_browser_entry) != IS_UNDEF) {
agent = &found_browser_entry;