mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
TSRMLS fixes
This commit is contained in:
parent
f72d907105
commit
ba761ce9b1
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
@ -111,11 +111,10 @@ php_ns_sapi_ub_write(const char *str, uint str_length TSRMLS_DC)
|
||||
*/
|
||||
|
||||
static int
|
||||
php_ns_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_struct *sapi_headers)
|
||||
php_ns_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_struct *sapi_headers TSRMLS_DC)
|
||||
{
|
||||
char *header_name, *header_content;
|
||||
char *p;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
header_name = sapi_header->header;
|
||||
header_content = p = strchr(header_name, ':');
|
||||
@ -146,10 +145,8 @@ php_ns_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_struct
|
||||
*/
|
||||
|
||||
static int
|
||||
php_ns_sapi_send_headers(sapi_headers_struct *sapi_headers)
|
||||
php_ns_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
|
||||
{
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if(SG(sapi_headers).send_default_content_type) {
|
||||
Ns_ConnSetRequiredHeaders(NSG(conn), "text/html", 0);
|
||||
}
|
||||
@ -165,11 +162,10 @@ php_ns_sapi_send_headers(sapi_headers_struct *sapi_headers)
|
||||
*/
|
||||
|
||||
static int
|
||||
php_ns_sapi_read_post(char *buf, uint count_bytes)
|
||||
php_ns_sapi_read_post(char *buf, uint count_bytes TSRMLS_DC)
|
||||
{
|
||||
uint max_read;
|
||||
uint total_read = 0;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
max_read = MIN(NSG(data_avail), count_bytes);
|
||||
|
||||
@ -189,12 +185,10 @@ php_ns_sapi_read_post(char *buf, uint count_bytes)
|
||||
* the HTTP request header
|
||||
*/
|
||||
|
||||
static char *
|
||||
php_ns_sapi_read_cookies()
|
||||
static char *php_ns_sapi_read_cookies(TSRMLS_D)
|
||||
{
|
||||
int i;
|
||||
char *http_cookie = NULL;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
i = Ns_SetIFind(NSG(conn->headers), "cookie");
|
||||
if(i != -1) {
|
||||
@ -209,7 +203,6 @@ static void php_info_aolserver(ZEND_MODULE_INFO_FUNC_ARGS)
|
||||
char buf[512];
|
||||
int uptime = Ns_InfoUptime();
|
||||
int i;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
php_info_print_table_start();
|
||||
php_info_print_table_row(2, "SAPI module version", "$Id$");
|
||||
@ -266,7 +259,6 @@ static zend_module_entry php_aolserver_module = {
|
||||
PHP_FUNCTION(getallheaders)
|
||||
{
|
||||
int i;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (array_init(return_value) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
|
@ -142,7 +142,6 @@ PHP_FUNCTION(apache_note)
|
||||
pval **arg_name, **arg_val;
|
||||
char *note_val;
|
||||
int arg_count = ARG_COUNT(ht);
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (arg_count<1 || arg_count>2 ||
|
||||
zend_get_parameters_ex(arg_count, &arg_name, &arg_val) ==FAILURE ) {
|
||||
@ -339,7 +338,6 @@ PHP_FUNCTION(getallheaders)
|
||||
array_header *env_arr;
|
||||
table_entry *tenv;
|
||||
int i;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (array_init(return_value) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
@ -365,7 +363,6 @@ PHP_FUNCTION(apache_lookup_uri)
|
||||
{
|
||||
pval **filename;
|
||||
request_rec *rr=NULL;
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
|
Loading…
Reference in New Issue
Block a user