cvs: php4 /ext/yaz php_yaz.c /sapi/aolserver aolserver.c /sapi/apache mod_php4.c php_apache.c sapi_apache.c /sapi/apache2filter sapi_apache2.c
/sapi/caudium caudium.c /sapi/cgi cgi_main.c /sapi/fastcgi fastcgi.c /sapi/isapi php4isapi.c /sapi/nsapi nsapi.c /sapi/phttpd phttpd.c
/sapi/pi3web pi3web_sapi.c /sapi/roxen roxen.c /sapi/thttpd thttpd.c /sapi/tux php_tux.c

From: Date: Thu, 27 Sep 2001 20:01:24 +0000
Subject: cvs: php4 /ext/yaz php_yaz.c /sapi/aolserver aolserver.c /sapi/apache mod_php4.c php_apache.c sapi_apache.c /sapi/apache2filter sapi_apache2.c
/sapi/caudium caudium.c /sapi/cgi cgi_main.c /sapi/fastcgi fastcgi.c /sapi/isapi php4isapi.c /sapi/nsapi nsapi.c /sapi/phttpd phttpd.c
/sapi/pi3web pi3web_sapi.c /sapi/roxen roxen.c /sapi/thttpd thttpd.c /sapi/tux php_tux.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-7601@lists.php.net to get a copy of this message
jeroen Thu Sep 27 16:01:24 2001 EDT Modified files: /php4/ext/yaz php_yaz.c /php4/sapi/aolserver aolserver.c /php4/sapi/apache mod_php4.c php_apache.c sapi_apache.c /php4/sapi/apache2filter sapi_apache2.c /php4/sapi/caudium caudium.c /php4/sapi/cgi cgi_main.c /php4/sapi/fastcgi fastcgi.c /php4/sapi/isapi php4isapi.c /php4/sapi/nsapi nsapi.c /php4/sapi/phttpd phttpd.c /php4/sapi/pi3web pi3web_sapi.c /php4/sapi/roxen roxen.c /php4/sapi/thttpd thttpd.c /php4/sapi/tux php_tux.c Log: Undo Z_ subst for sapi and ext/yaz

Index: php4/ext/yaz/php_yaz.c diff -u php4/ext/yaz/php_yaz.c:1.30 php4/ext/yaz/php_yaz.c:1.31 --- php4/ext/yaz/php_yaz.c:1.30 Wed Sep 26 04:35:46 2001 +++ php4/ext/yaz/php_yaz.c Thu Sep 27 16:01:15 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_yaz.c,v 1.30 2001/09/26 08:35:46 jeroen Exp $ */ +/* $Id: php_yaz.c,v 1.31 2001/09/27 20:01:15 jeroen Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -369,7 +369,7 @@ { SEPARATE_ZVAL(pvalue); convert_to_string(*pvalue); - return Z_STRVAL_PP(pvalue); + return (*pvalue)->value.str.val; } return 0; } @@ -383,7 +383,7 @@ { SEPARATE_ZVAL(pvalue); convert_to_long(*pvalue); - return &Z_LVAL_PP(pvalue); + return &(*pvalue)->value.lval; } return 0; } @@ -397,7 +397,7 @@ { SEPARATE_ZVAL(pvalue); convert_to_boolean(*pvalue); - return &Z_LVAL_PP(pvalue); + return &(*pvalue)->value.lval; } return 0; } @@ -1235,7 +1235,7 @@ else { convert_to_string_ex (user); - user_str = Z_STRVAL_PP(user); + user_str = (*user)->value.str.val; } } else @@ -1243,7 +1243,7 @@ WRONG_PARAM_COUNT; } convert_to_string_ex (zurl); - zurl_str = Z_STRVAL_PP(zurl); + zurl_str = (*zurl)->value.str.val; for (cp = zurl_str; *cp && strchr("\t\n ", *cp); cp++) ; if (!*cp) @@ -1339,7 +1339,7 @@ if (!p) RETURN_FALSE; release_assoc (p); - zend_list_delete (Z_LVAL_PP(id)); + zend_list_delete ((*id)->value.lval); RETURN_TRUE; } /* }}} */ @@ -1370,17 +1370,17 @@ } p->action = 0; convert_to_string_ex (type); - type_str = Z_STRVAL_PP(type); + type_str = (*type)->value.str.val; convert_to_string_ex (query); - query_str = Z_STRVAL_PP(query); + query_str = (*query)->value.str.val; yaz_resultset_destroy (p->resultSets); r = p->resultSets = yaz_resultset_mk(); r->query = odr_malloc (r->odr, sizeof(*r->query)); if (!strcmp (type_str, "rpn")) { r->query->which = Z_Query_type_1; - Z_TYPE(r->query->u)_1 = p_query_rpn (r->odr, PROTO_Z3950, query_str); - if (!Z_TYPE(r->query->u)_1) + r->query->u.type_1 = p_query_rpn (r->odr, PROTO_Z3950, query_str); + if (!r->query->u.type_1) { yaz_resultset_destroy(r); p->resultSets = 0; @@ -1394,9 +1394,9 @@ else if (!strcmp(type_str, "ccl")) { r->query->which = Z_Query_type_2; - Z_TYPE(r->query->u)_2 = odr_malloc (r->odr, sizeof(*Z_TYPE(r->query->u)_2)); - Z_TYPE(r->query->u)_2->buf = odr_strdup(r->odr, query_str); - Z_TYPE(r->query->u)_2->len = strlen(query_str); + r->query->u.type_2 = odr_malloc (r->odr, sizeof(*r->query->u.type_2)); + r->query->u.type_2->buf = odr_strdup(r->odr, query_str); + r->query->u.type_2->len = strlen(query_str); } else { @@ -1560,10 +1560,10 @@ msg = "unknown diagnostic"; } /* Not macro using because RETURN_STRING throws away const */ - Z_STRLEN_P(return_value) = strlen(msg); - Z_STRVAL_P(return_value) = - estrndup(msg, Z_STRLEN_P(return_value)); - Z_TYPE_P(return_value) = IS_STRING; + return_value->value.str.len = strlen(msg); + return_value->value.str.val = + estrndup(msg, return_value->value.str.len); + return_value->type = IS_STRING; } release_assoc (p); } @@ -1867,7 +1867,7 @@ grs[level] = e->content->u.subtree; eno[level] = -1; } - zend_hash_next_index_insert (Z_ARRVAL_P(return_value), + zend_hash_next_index_insert (return_value->value.ht, (void *) &my_zval, sizeof(zval *), NULL); eno[level]++; } @@ -1892,10 +1892,10 @@ get_assoc (INTERNAL_FUNCTION_PARAM_PASSTHRU, pval_id, &p); convert_to_long_ex(pval_pos); - pos = Z_LVAL_PP(pval_pos); + pos = (*pval_pos)->value.lval; convert_to_string_ex(pval_type); - type = Z_STRVAL_PP(pval_type); + type = (*pval_type)->value.str.val; if (p && p->resultSets && p->resultSets->recordList && pos >= p->resultSetStartPoint && @@ -1996,7 +1996,7 @@ { convert_to_string_ex (pval_syntax); xfree (p->preferredRecordSyntax); - p->preferredRecordSyntax = xstrdup (Z_STRVAL_PP(pval_syntax)); + p->preferredRecordSyntax = xstrdup ((*pval_syntax)->value.str.val); } release_assoc (p); } @@ -2018,7 +2018,7 @@ { convert_to_string_ex (pval_element); xfree (p->elementSetNames); - p->elementSetNames = xstrdup (Z_STRVAL_PP(pval_element)); + p->elementSetNames = xstrdup ((*pval_element)->value.str.val); } release_assoc (p); } @@ -2041,11 +2041,11 @@ if (p) { convert_to_long_ex (pval_start); - p->resultSetStartPoint = Z_LVAL_PP(pval_start); + p->resultSetStartPoint = (*pval_start)->value.lval; if (p->resultSetStartPoint < 1) p->resultSetStartPoint = 1; convert_to_long_ex (pval_number); - p->numberOfRecordsRequested = Z_LVAL_PP(pval_number); + p->numberOfRecordsRequested = (*pval_number)->value.lval; } release_assoc (p); } @@ -2071,11 +2071,11 @@ if (p->resultSets && p->resultSets->sorted) { if (!p->sort_criteria || strcmp (p->sort_criteria, - Z_STRVAL_PP(pval_criteria))) + (*pval_criteria)->value.str.val)) p->resultSets->sorted = 0; } xfree (p->sort_criteria); - p->sort_criteria = xstrdup (Z_STRVAL_PP(pval_criteria)); + p->sort_criteria = xstrdup ((*pval_criteria)->value.str.val); } release_assoc (p); } @@ -2441,7 +2441,7 @@ add_next_index_string(my_zval, "unknown", 1); zend_hash_next_index_insert ( - Z_ARRVAL_P(return_value), (void *) &my_zval, sizeof(zval *), + return_value->value.ht, (void *) &my_zval, sizeof(zval *), NULL); } @@ -2492,7 +2492,7 @@ #endif if (type != HASH_KEY_IS_STRING || Z_TYPE_PP(ent) != IS_STRING) continue; - ccl_qual_fitem(p->ccl_parser->bibset, Z_STRVAL_PP(ent), key); + ccl_qual_fitem(p->ccl_parser->bibset, (*ent)->value.str.val, key); } } release_assoc (p); @@ -2523,7 +2523,7 @@ get_assoc (INTERNAL_FUNCTION_PARAM_PASSTHRU, pval_id, &p); if (p) { - const char *query_str = Z_STRVAL_PP(pval_query); + const char *query_str = (*pval_query)->value.str.val; struct ccl_rpn_node *rpn; struct ccl_token *token_list = ccl_parser_tokenize(p->ccl_parser, query_str); @@ -2575,7 +2575,7 @@ if (p) { xfree (p->local_databases); - p->local_databases = xstrdup (Z_STRVAL_PP(pval_database)); + p->local_databases = xstrdup ((*pval_database)->value.str.val); RETVAL_TRUE; } else Index: php4/sapi/aolserver/aolserver.c diff -u php4/sapi/aolserver/aolserver.c:1.63 php4/sapi/aolserver/aolserver.c:1.64 --- php4/sapi/aolserver/aolserver.c:1.63 Tue Sep 25 17:58:33 2001 +++ php4/sapi/aolserver/aolserver.c Thu Sep 27 16:01:16 2001 @@ -22,7 +22,7 @@ * - CGI/1.1 conformance */ -/* $Id: aolserver.c,v 1.63 2001/09/25 21:58:33 jeroen Exp $ */ +/* $Id: aolserver.c,v 1.64 2001/09/27 20:01:16 jeroen Exp $ */ /* conflict between PHP and AOLserver headers */ #define Debug php_Debug @@ -205,7 +205,7 @@ int i; php_info_print_table_start(); - php_info_print_table_row(2, "SAPI module version", "$Id: aolserver.c,v 1.63 2001/09/25 21:58:33 jeroen Exp $"); + php_info_print_table_row(2, "SAPI module version", "$Id: aolserver.c,v 1.64 2001/09/27 20:01:16 jeroen Exp $"); php_info_print_table_row(2, "Build date", Ns_InfoBuildDate()); php_info_print_table_row(2, "Config file path", Ns_InfoConfigFile()); php_info_print_table_row(2, "Error Log path", Ns_InfoErrorLog()); @@ -403,7 +403,7 @@ { zend_file_handle file_handle; - Z_TYPE(file_handle) = ZEND_HANDLE_FILENAME; + file_handle.type = ZEND_HANDLE_FILENAME; file_handle.filename = SG(request_info).path_translated; file_handle.free_filename = 0; file_handle.opened_path = NULL; Index: php4/sapi/apache/mod_php4.c diff -u php4/sapi/apache/mod_php4.c:1.125 php4/sapi/apache/mod_php4.c:1.126 --- php4/sapi/apache/mod_php4.c:1.125 Tue Sep 25 17:58:34 2001 +++ php4/sapi/apache/mod_php4.c Thu Sep 27 16:01:16 2001 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: mod_php4.c,v 1.125 2001/09/25 21:58:34 jeroen Exp $ */ +/* $Id: mod_php4.c,v 1.126 2001/09/27 20:01:16 jeroen Exp $ */ #define NO_REGEX_EXTRA_H #ifdef WIN32 @@ -255,7 +255,7 @@ /* If PATH_TRANSLATED doesn't exist, copy it from SCRIPT_FILENAME */ if (track_vars_array) { - symbol_table = Z_ARRVAL_P(track_vars_array); + symbol_table = track_vars_array->value.ht; } else if (PG(register_globals)) { /* should never happen nowadays */ symbol_table = EG(active_symbol_table); @@ -458,7 +458,7 @@ */ static int php_apache_alter_ini_entries(php_per_dir_entry *per_dir_entry TSRMLS_DC) { - zend_alter_ini_entry(per_dir_entry->key, per_dir_entry->key_length+1, per_dir_entry->value, per_dir_entry->value_length, Z_TYPE_P(per_dir_entry), PHP_INI_STAGE_ACTIVATE); + zend_alter_ini_entry(per_dir_entry->key, per_dir_entry->key_length+1, per_dir_entry->value, per_dir_entry->value_length, per_dir_entry->type, PHP_INI_STAGE_ACTIVATE); return 0; } /* }}} */ @@ -497,7 +497,7 @@ fh.filename = r->filename; fh.opened_path = NULL; fh.free_filename = 0; - Z_TYPE(fh) = ZEND_HANDLE_FILENAME; + fh.type = ZEND_HANDLE_FILENAME; zend_execute_scripts(ZEND_INCLUDE TSRMLS_CC, NULL, 1, &fh); return OK; } @@ -641,8 +641,8 @@ */ static zend_bool should_overwrite_per_dir_entry(php_per_dir_entry *orig_per_dir_entry, php_per_dir_entry *new_per_dir_entry) { - if (Z_TYPE_P(new_per_dir_entry)==PHP_INI_SYSTEM - && Z_TYPE_P(orig_per_dir_entry)!=PHP_INI_SYSTEM) { + if (new_per_dir_entry->type==PHP_INI_SYSTEM + && orig_per_dir_entry->type!=PHP_INI_SYSTEM) { return 1; } else { return 0; @@ -697,7 +697,7 @@ sapi_startup(&apache_sapi_module); php_apache_startup(&apache_sapi_module); } - Z_TYPE(per_dir_entry) = mode; + per_dir_entry.type = mode; if (strcasecmp(arg2, "none") == 0) { arg2 = ""; Index: php4/sapi/apache/php_apache.c diff -u php4/sapi/apache/php_apache.c:1.48 php4/sapi/apache/php_apache.c:1.49 --- php4/sapi/apache/php_apache.c:1.48 Tue Sep 25 17:58:35 2001 +++ php4/sapi/apache/php_apache.c Thu Sep 27 16:01:16 2001 @@ -17,7 +17,7 @@ | David Sklar <sklar@student.net> | +----------------------------------------------------------------------+ */ -/* $Id: php_apache.c,v 1.48 2001/09/25 21:58:35 jeroen Exp $ */ +/* $Id: php_apache.c,v 1.49 2001/09/27 20:01:16 jeroen Exp $ */ #define NO_REGEX_EXTRA_H @@ -151,11 +151,11 @@ } convert_to_string_ex(arg_name); - note_val = (char *) table_get(((request_rec *)SG(server_context))->notes, Z_STRVAL_PP(arg_name)); + note_val = (char *) table_get(((request_rec *)SG(server_context))->notes, (*arg_name)->value.str.val); if (arg_count == 2) { convert_to_string_ex(arg_val); - table_set(((request_rec *)SG(server_context))->notes, Z_STRVAL_PP(arg_name), Z_STRVAL_PP(arg_val)); + table_set(((request_rec *)SG(server_context))->notes, (*arg_name)->value.str.val, (*arg_val)->value.str.val); } if (note_val) { @@ -307,14 +307,14 @@ } convert_to_string_ex(filename); - if (!(rr = sub_req_lookup_uri (Z_STRVAL_PP(filename), ((request_rec *) SG(server_context))))) { - php_error(E_WARNING, "Unable to include '%s' - URI lookup failed", Z_STRVAL_PP(filename)); + if (!(rr = sub_req_lookup_uri ((*filename)->value.str.val, ((request_rec *) SG(server_context))))) { + php_error(E_WARNING, "Unable to include '%s' - URI lookup failed", (*filename)->value.str.val); if (rr) destroy_sub_req (rr); RETURN_FALSE; } if (rr->status != 200) { - php_error(E_WARNING, "Unable to include '%s' - error finding URI", Z_STRVAL_PP(filename)); + php_error(E_WARNING, "Unable to include '%s' - error finding URI", (*filename)->value.str.val); if (rr) destroy_sub_req (rr); RETURN_FALSE; } @@ -323,7 +323,7 @@ php_header(); if (run_sub_req(rr)) { - php_error(E_WARNING, "Unable to include '%s' - request execution failed", Z_STRVAL_PP(filename)); + php_error(E_WARNING, "Unable to include '%s' - request execution failed", (*filename)->value.str.val); if (rr) destroy_sub_req (rr); RETURN_FALSE; } else { @@ -393,8 +393,8 @@ } convert_to_string_ex(filename); - if(!(rr = sub_req_lookup_uri(Z_STRVAL_PP(filename), ((request_rec *) SG(server_context))))) { - php_error(E_WARNING, "URI lookup failed", Z_STRVAL_PP(filename)); + if(!(rr = sub_req_lookup_uri((*filename)->value.str.val, ((request_rec *) SG(server_context))))) { + php_error(E_WARNING, "URI lookup failed", (*filename)->value.str.val); RETURN_FALSE; } object_init(return_value); @@ -468,8 +468,8 @@ } convert_to_string_ex(filename); - if(!(rr = ap_sub_req_lookup_uri(Z_STRVAL_PP(filename), ((request_rec *) SG(server_context))))) { - php_error(E_WARNING, "URI lookup failed", Z_STRVAL_PP(filename)); + if(!(rr = ap_sub_req_lookup_uri((*filename)->value.str.val, ((request_rec *) SG(server_context))))) { + php_error(E_WARNING, "URI lookup failed", (*filename)->value.str.val); RETURN_FALSE; } RETVAL_LONG(ap_run_sub_req(rr)); Index: php4/sapi/apache/sapi_apache.c diff -u php4/sapi/apache/sapi_apache.c:1.37 php4/sapi/apache/sapi_apache.c:1.38 --- php4/sapi/apache/sapi_apache.c:1.37 Tue Sep 25 17:58:35 2001 +++ php4/sapi/apache/sapi_apache.c Thu Sep 27 16:01:17 2001 @@ -19,7 +19,7 @@ | Stig Bakken <ssb@fast.no> | +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache.c,v 1.37 2001/09/25 21:58:35 jeroen Exp $ */ +/* $Id: sapi_apache.c,v 1.38 2001/09/27 20:01:17 jeroen Exp $ */ #define NO_REGEX_EXTRA_H #ifdef WIN32 @@ -81,7 +81,7 @@ return NOT_FOUND; } } else { - Z_TYPE(file_handle) = ZEND_HANDLE_FILENAME; + file_handle.type = ZEND_HANDLE_FILENAME; file_handle.handle.fd = 0; file_handle.filename = SG(request_info).path_translated; file_handle.opened_path = NULL; Index: php4/sapi/apache2filter/sapi_apache2.c diff -u php4/sapi/apache2filter/sapi_apache2.c:1.55 php4/sapi/apache2filter/sapi_apache2.c:1.56 --- php4/sapi/apache2filter/sapi_apache2.c:1.55 Tue Sep 25 17:58:35 2001 +++ php4/sapi/apache2filter/sapi_apache2.c Thu Sep 27 16:01:17 2001 @@ -369,7 +369,7 @@ apr_file_name_get(&path, ((apr_bucket_file *) b->data)->fd); - Z_TYPE(zfd) = ZEND_HANDLE_FILENAME; + zfd.type = ZEND_HANDLE_FILENAME; zfd.filename = (char *) path; zfd.free_filename = 0; zfd.opened_path = NULL; Index: php4/sapi/caudium/caudium.c diff -u php4/sapi/caudium/caudium.c:1.23 php4/sapi/caudium/caudium.c:1.24 --- php4/sapi/caudium/caudium.c:1.23 Tue Sep 25 17:58:35 2001 +++ php4/sapi/caudium/caudium.c Thu Sep 27 16:01:18 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: caudium.c,v 1.23 2001/09/25 21:58:35 jeroen Exp $ */ +/* $Id: caudium.c,v 1.24 2001/09/27 20:01:18 jeroen Exp $ */ #include "php.h" #ifdef HAVE_CAUDIUM @@ -165,7 +165,7 @@ sind = make_shared_string("env"); headers = low_mapping_string_lookup(REQUEST_DATA, sind); free_string(sind); - if(!headers || Z_TYPE_P(headers) != PIKE_T_MAPPING) return NULL; + if(!headers || headers->type != PIKE_T_MAPPING) return NULL; sind = make_shared_string(headername); value = low_mapping_string_lookup(headers->u.mapping, sind); free_string(sind); @@ -180,7 +180,7 @@ { struct svalue *head = NULL; THREAD_SAFE_RUN(head = lookup_header(headername), "header lookup"); - if(!head || Z_TYPE_P(head) != PIKE_T_STRING) + if(!head || head->type != PIKE_T_STRING) return default_value; return head->u.string->str; } @@ -192,7 +192,7 @@ { struct svalue *head = NULL; THREAD_SAFE_RUN(head = lookup_header(headername), "header lookup"); - if(!head || Z_TYPE_P(head) != PIKE_T_INT) + if(!head || head->type != PIKE_T_INT) return default_value; return head->u.integer; } @@ -288,10 +288,10 @@ (int)(p - header_name)); s_headermap = low_mapping_string_lookup(REQUEST_DATA, ind); - if(!s_headermap || Z_TYPE_P(s_headermap) != PIKE_T_MAPPING) + if(!s_headermap || s_headermap->type != PIKE_T_MAPPING) { struct svalue mappie; - Z_TYPE(mappie) = PIKE_T_MAPPING; + mappie.type = PIKE_T_MAPPING; headermap = allocate_mapping(1); mappie.u.mapping = headermap; mapping_string_insert(REQUEST_DATA, ind, &mappie); @@ -302,7 +302,7 @@ soldval = low_mapping_string_lookup(headermap, hind); vallen = strlen(value); if(soldval != NULL && - Z_TYPE_P(soldval) == PIKE_T_STRING && + soldval->type == PIKE_T_STRING && soldval->u.string->size_shift == 0) { /* Existing, valid header. Prepend.*/ hval = begin_shared_string(soldval->u.string->len + 1 + vallen); @@ -314,7 +314,7 @@ hval = make_shared_string(value); } } - Z_TYPE(hsval) = PIKE_T_STRING; + hsval.type = PIKE_T_STRING; hsval.u.string = hval; mapping_string_insert(headermap, hind, &hsval); @@ -367,7 +367,7 @@ free_string(ind); push_int(SG(sapi_headers).http_response_code); - if(s_headermap && Z_TYPE_P(s_headermap) == PIKE_T_MAPPING) + if(s_headermap && s_headermap->type == PIKE_T_MAPPING) ref_push_mapping(s_headermap->u.mapping); else push_int(0); @@ -439,7 +439,7 @@ { /* char buf[512]; */ php_info_print_table_start(); - php_info_print_table_row(2, "SAPI module version", "$Id: caudium.c,v 1.23 2001/09/25 21:58:35 jeroen Exp $"); + php_info_print_table_row(2, "SAPI module version", "$Id: caudium.c,v 1.24 2001/09/27 20:01:18 jeroen Exp $"); /* php_info_print_table_row(2, "Build date", Ns_InfoBuildDate()); php_info_print_table_row(2, "Config file path", Ns_InfoConfigFile()); php_info_print_table_row(2, "Error Log path", Ns_InfoErrorLog()); @@ -566,21 +566,21 @@ sind = make_shared_string("env"); headers = low_mapping_string_lookup(REQUEST_DATA, sind); free_string(sind); - if(headers && Z_TYPE_P(headers) == PIKE_T_MAPPING) { + if(headers && headers->type == PIKE_T_MAPPING) { indices = mapping_indices(headers->u.mapping); for(i = 0; i < indices->size; i++) { ind = &indices->item[i]; val = low_mapping_lookup(headers->u.mapping, ind); - if(ind && Z_TYPE_P(ind) == PIKE_T_STRING && - val && Z_TYPE_P(val) == PIKE_T_STRING) { + if(ind && ind->type == PIKE_T_STRING && + val && val->type == PIKE_T_STRING) { int buf_len; buf_len = MIN(511, ind->u.string->len); strncpy(buf, ind->u.string->str, buf_len); buf[buf_len] = '\0'; /* Terminate correctly */ MAKE_STD_ZVAL(pval); - Z_TYPE_P(pval) = IS_STRING; - Z_STRLEN_P(pval) = val->u.string->len; - Z_STRVAL_P(pval) = estrndup(val->u.string->str, Z_STRLEN_P(pval)); + pval->type = IS_STRING; + pval->value.str.len = val->u.string->len; + pval->value.str.val = estrndup(val->u.string->str, pval->value.str.len); zend_hash_update(&EG(symbol_table), buf, buf_len + 1, &pval, sizeof(zval *), NULL); } @@ -590,8 +590,8 @@ /* MAKE_STD_ZVAL(pval); - Z_TYPE_P(pval) = IS_LONG; - Z_LVAL_P(pval) = Ns_InfoBootTime(); + pval->type = IS_LONG; + pval->value.lval = Ns_InfoBootTime(); zend_hash_update(&EG(symbol_table), "SERVER_BOOTTIME", sizeof("SERVER_BOOTTIME"), &pval, sizeof(zval *), NULL); */ } @@ -688,7 +688,7 @@ VCWD_CHDIR_FILE(THIS->filename->str); #endif - Z_TYPE(file_handle) = ZEND_HANDLE_FILENAME; + file_handle.type = ZEND_HANDLE_FILENAME; file_handle.filename = THIS->filename->str; file_handle.opened_path = NULL; file_handle.free_filename = 0; @@ -759,7 +759,7 @@ get_all_args("PHP4.Interpreter->run", args, "%S%m%O%*", &script, &request_data, &my_fd_obj, &done_callback); - if(Z_TYPE_P(done_callback) != PIKE_T_FUNCTION) + if(done_callback->type != PIKE_T_FUNCTION) Pike_error("PHP4.Interpreter->run: Bad argument 4, expected function.\n"); add_ref(request_data); add_ref(my_fd_obj); @@ -772,7 +772,7 @@ ind = make_shared_binary_string("my_fd", 5); raw_fd = low_mapping_string_lookup(THIS->request_data, ind); - if(raw_fd && Z_TYPE_P(raw_fd) == PIKE_T_OBJECT) + if(raw_fd && raw_fd->type == PIKE_T_OBJECT) { int fd = fd_from_object(raw_fd->u.object); if(fd == -1) Index: php4/sapi/cgi/cgi_main.c diff -u php4/sapi/cgi/cgi_main.c:1.135 php4/sapi/cgi/cgi_main.c:1.136 --- php4/sapi/cgi/cgi_main.c:1.135 Tue Sep 25 17:58:36 2001 +++ php4/sapi/cgi/cgi_main.c Thu Sep 27 16:01:18 2001 @@ -676,7 +676,7 @@ SG(request_info).no_headers = 1; } file_handle.filename = "-"; - Z_TYPE(file_handle) = ZEND_HANDLE_FP; + file_handle.type = ZEND_HANDLE_FP; file_handle.handle.fp = stdin; file_handle.opened_path = NULL; file_handle.free_filename = 0; Index: php4/sapi/fastcgi/fastcgi.c diff -u php4/sapi/fastcgi/fastcgi.c:1.18 php4/sapi/fastcgi/fastcgi.c:1.19 --- php4/sapi/fastcgi/fastcgi.c:1.18 Tue Sep 25 17:58:36 2001 +++ php4/sapi/fastcgi/fastcgi.c Thu Sep 27 16:01:19 2001 @@ -196,7 +196,7 @@ zend_file_handle file_handle; int c, retval = FAILURE; - Z_TYPE(file_handle) = ZEND_HANDLE_FILENAME; + file_handle.type = ZEND_HANDLE_FILENAME; file_handle.filename = SG(request_info).path_translated; file_handle.free_filename = 0; file_handle.opened_path = NULL; Index: php4/sapi/isapi/php4isapi.c diff -u php4/sapi/isapi/php4isapi.c:1.82 php4/sapi/isapi/php4isapi.c:1.83 --- php4/sapi/isapi/php4isapi.c:1.82 Tue Sep 25 17:58:36 2001 +++ php4/sapi/isapi/php4isapi.c Thu Sep 27 16:01:19 2001 @@ -748,7 +748,7 @@ file_handle.filename = SG(request_info.path_translated); file_handle.free_filename = 0; #endif - Z_TYPE(file_handle) = ZEND_HANDLE_FILENAME; + file_handle.type = ZEND_HANDLE_FILENAME; file_handle.opened_path = NULL; php_request_startup(TSRMLS_C); Index: php4/sapi/nsapi/nsapi.c diff -u php4/sapi/nsapi/nsapi.c:1.23 php4/sapi/nsapi/nsapi.c:1.24 --- php4/sapi/nsapi/nsapi.c:1.23 Tue Sep 25 17:58:37 2001 +++ php4/sapi/nsapi/nsapi.c Thu Sep 27 16:01:20 2001 @@ -449,7 +449,7 @@ return FAILURE; } - Z_TYPE(file_handle) = ZEND_HANDLE_FILENAME; + file_handle.type = ZEND_HANDLE_FILENAME; file_handle.filename = SG(request_info).path_translated; file_handle.free_filename = 0; file_handle.opened_path = NULL; Index: php4/sapi/phttpd/phttpd.c diff -u php4/sapi/phttpd/phttpd.c:1.32 php4/sapi/phttpd/phttpd.c:1.33 --- php4/sapi/phttpd/phttpd.c:1.32 Tue Sep 25 17:58:37 2001 +++ php4/sapi/phttpd/phttpd.c Thu Sep 27 16:01:20 2001 @@ -259,7 +259,7 @@ return -1; } - Z_TYPE(file_handle) = ZEND_HANDLE_FILENAME; + file_handle.type = ZEND_HANDLE_FILENAME; file_handle.filename = SG(request_info).path_translated; file_handle.free_filename = 0; Index: php4/sapi/pi3web/pi3web_sapi.c diff -u php4/sapi/pi3web/pi3web_sapi.c:1.33 php4/sapi/pi3web/pi3web_sapi.c:1.34 --- php4/sapi/pi3web/pi3web_sapi.c:1.33 Tue Sep 25 17:58:38 2001 +++ php4/sapi/pi3web/pi3web_sapi.c Thu Sep 27 16:01:21 2001 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pi3web_sapi.c,v 1.33 2001/09/25 21:58:38 jeroen Exp $ */ +/* $Id: pi3web_sapi.c,v 1.34 2001/09/27 20:01:21 jeroen Exp $ */ #include "pi3web_sapi.h" #include "php.h" @@ -77,7 +77,7 @@ PUTS("<table border=0 cellpadding=3 cellspacing=1 width=600 align=center>\n"); PUTS("<tr><th colspan=2 bgcolor=\"" PHP_HEADER_COLOR "\">Pi3Web Server Information</th></tr>\n"); php_info_print_table_header(2, "Information Field", "Value"); - php_info_print_table_row(2, "Pi3Web SAPI module version", "$Id: pi3web_sapi.c,v 1.33 2001/09/25 21:58:38 jeroen Exp $"); + php_info_print_table_row(2, "Pi3Web SAPI module version", "$Id: pi3web_sapi.c,v 1.34 2001/09/27 20:01:21 jeroen Exp $"); php_info_print_table_row(2, "Server Name Stamp", HTTPCore_getServerStamp()); snprintf(variable_buf, 511, "%d", HTTPCore_debugEnabled()); php_info_print_table_row(2, "Debug Enabled", variable_buf); @@ -355,9 +355,9 @@ } *colon = 0; INIT_PZVAL(entry); - Z_STRLEN_P(entry) = strlen(value); - Z_STRVAL_P(entry) = estrndup(value, Z_STRLEN_P(entry)); - Z_TYPE_P(entry) = IS_STRING; + entry->value.str.len = strlen(value); + entry->value.str.val = estrndup(value, entry->value.str.len); + entry->type = IS_STRING; zend_hash_add(&EG(symbol_table), variable, strlen(variable)+1, &entry, sizeof(zval *), NULL); *colon = ':'; } @@ -379,7 +379,7 @@ zend_first_try { file_handle.filename = lpCB->lpszFileName; file_handle.free_filename = 0; - Z_TYPE(file_handle) = ZEND_HANDLE_FILENAME; + file_handle.type = ZEND_HANDLE_FILENAME; file_handle.opened_path = NULL; CG(extended_info) = 0; Index: php4/sapi/roxen/roxen.c diff -u php4/sapi/roxen/roxen.c:1.48 php4/sapi/roxen/roxen.c:1.49 --- php4/sapi/roxen/roxen.c:1.48 Tue Sep 25 17:58:38 2001 +++ php4/sapi/roxen/roxen.c Thu Sep 27 16:01:21 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: roxen.c,v 1.48 2001/09/25 21:58:38 jeroen Exp $ */ +/* $Id: roxen.c,v 1.49 2001/09/27 20:01:21 jeroen Exp $ */ #include "php.h" #ifdef HAVE_ROXEN @@ -172,7 +172,7 @@ sind = make_shared_string("env"); headers = low_mapping_string_lookup(REQUEST_DATA, sind); free_string(sind); - if(!headers || Z_TYPE_P(headers) != PIKE_T_MAPPING) return NULL; + if(!headers || headers->type != PIKE_T_MAPPING) return NULL; sind = make_shared_string(headername); value = low_mapping_string_lookup(headers->u.mapping, sind); free_string(sind); @@ -187,7 +187,7 @@ { struct svalue *head = NULL; THREAD_SAFE_RUN(head = lookup_header(headername), "header lookup"); - if(!head || Z_TYPE_P(head) != PIKE_T_STRING) + if(!head || head->type != PIKE_T_STRING) return default_value; return head->u.string->str; } @@ -199,7 +199,7 @@ { struct svalue *head = NULL; THREAD_SAFE_RUN(head = lookup_header(headername), "header lookup"); - if(!head || Z_TYPE_P(head) != PIKE_T_INT) + if(!head || head->type != PIKE_T_INT) return default_value; return head->u.integer; } @@ -301,7 +301,7 @@ if(!s_headermap) { struct svalue mappie; - Z_TYPE(mappie) = PIKE_T_MAPPING; + mappie.type = PIKE_T_MAPPING; headermap = allocate_mapping(1); mappie.u.mapping = headermap; mapping_string_insert(REQUEST_DATA, ind, &mappie); @@ -309,7 +309,7 @@ } else headermap = s_headermap->u.mapping; - Z_TYPE(hsval) = PIKE_T_STRING; + hsval.type = PIKE_T_STRING; hsval.u.string = hval; mapping_string_insert(headermap, hind, &hsval); @@ -364,7 +364,7 @@ free_string(ind); push_int(SG(sapi_headers).http_response_code); - if(s_headermap && Z_TYPE_P(s_headermap) == PIKE_T_MAPPING) + if(s_headermap && s_headermap->type == PIKE_T_MAPPING) ref_push_mapping(s_headermap->u.mapping); else push_int(0); @@ -438,7 +438,7 @@ { /* char buf[512]; */ php_info_print_table_start(); - php_info_print_table_row(2, "SAPI module version", "$Id: roxen.c,v 1.48 2001/09/25 21:58:38 jeroen Exp $"); + php_info_print_table_row(2, "SAPI module version", "$Id: roxen.c,v 1.49 2001/09/27 20:01:21 jeroen Exp $"); /* php_info_print_table_row(2, "Build date", Ns_InfoBuildDate()); php_info_print_table_row(2, "Config file path", Ns_InfoConfigFile()); php_info_print_table_row(2, "Error Log path", Ns_InfoErrorLog()); @@ -513,9 +513,9 @@ */ #define ADD_STRING(name) \ MAKE_STD_ZVAL(pval); \ - Z_TYPE_P(pval) = IS_STRING; \ - Z_STRLEN_P(pval) = strlen(buf); \ - Z_STRVAL_P(pval) = estrndup(buf, Z_STRLEN_P(pval)); \ + pval->type = IS_STRING; \ + pval->value.str.len = strlen(buf); \ + pval->value.str.val = estrndup(buf, pval->value.str.len); \ zend_hash_update(&EG(symbol_table), name, sizeof(name), \ &pval, sizeof(zval *), NULL) @@ -535,21 +535,21 @@ sind = make_shared_string("env"); headers = low_mapping_string_lookup(REQUEST_DATA, sind); free_string(sind); - if(headers && Z_TYPE_P(headers) == PIKE_T_MAPPING) { + if(headers && headers->type == PIKE_T_MAPPING) { indices = mapping_indices(headers->u.mapping); for(i = 0; i < indices->size; i++) { ind = &indices->item[i]; val = low_mapping_lookup(headers->u.mapping, ind); - if(ind && Z_TYPE_P(ind) == PIKE_T_STRING && - val && Z_TYPE_P(val) == PIKE_T_STRING) { + if(ind && ind->type == PIKE_T_STRING && + val && val->type == PIKE_T_STRING) { int buf_len; buf_len = MIN(511, ind->u.string->len); strncpy(buf, ind->u.string->str, buf_len); buf[buf_len] = '\0'; /* Terminate correctly */ MAKE_STD_ZVAL(pval); - Z_TYPE_P(pval) = IS_STRING; - Z_STRLEN_P(pval) = val->u.string->len; - Z_STRVAL_P(pval) = estrndup(val->u.string->str, Z_STRLEN_P(pval)); + pval->type = IS_STRING; + pval->value.str.len = val->u.string->len; + pval->value.str.val = estrndup(val->u.string->str, pval->value.str.len); zend_hash_update(&EG(symbol_table), buf, buf_len + 1, &pval, sizeof(zval *), NULL); } @@ -559,8 +559,8 @@ /* MAKE_STD_ZVAL(pval); - Z_TYPE_P(pval) = IS_LONG; - Z_LVAL_P(pval) = Ns_InfoBootTime(); + pval->type = IS_LONG; + pval->value.lval = Ns_InfoBootTime(); zend_hash_update(&EG(symbol_table), "SERVER_BOOTTIME", sizeof("SERVER_BOOTTIME"), &pval, sizeof(zval *), NULL); */ } @@ -579,7 +579,7 @@ GET_THIS(); #endif - Z_TYPE(file_handle) = ZEND_HANDLE_FILENAME; + file_handle.type = ZEND_HANDLE_FILENAME; file_handle.filename = THIS->filename; file_handle.free_filename = 0; file_handle.opened_path = NULL; @@ -620,7 +620,7 @@ "callback!"); get_all_args("PHP4.Interpreter->run", args, "%S%m%O%*", &script, &request_data, &my_fd_obj, &done_callback); - if(Z_TYPE_P(done_callback) != PIKE_T_FUNCTION) + if(done_callback->type != PIKE_T_FUNCTION) error("PHP4.Interpreter->run: Bad argument 4, expected function.\n"); PHP_LOCK(THIS); /* Need to lock here or reusing the same object might cause * problems in changing stuff in that object */ @@ -653,7 +653,7 @@ ind = make_shared_binary_string("my_fd", 5); raw_fd = low_mapping_string_lookup(THIS->request_data, ind); - if(raw_fd && Z_TYPE_P(raw_fd) == PIKE_T_OBJECT) + if(raw_fd && raw_fd->type == PIKE_T_OBJECT) { int fd = fd_from_object(raw_fd->u.object); if(fd == -1) Index: php4/sapi/thttpd/thttpd.c diff -u php4/sapi/thttpd/thttpd.c:1.56 php4/sapi/thttpd/thttpd.c:1.57 --- php4/sapi/thttpd/thttpd.c:1.56 Tue Sep 25 17:58:39 2001 +++ php4/sapi/thttpd/thttpd.c Thu Sep 27 16:01:23 2001 @@ -253,7 +253,7 @@ { zend_file_handle file_handle; - Z_TYPE(file_handle) = ZEND_HANDLE_FILENAME; + file_handle.type = ZEND_HANDLE_FILENAME; file_handle.filename = SG(request_info).path_translated; file_handle.free_filename = 0; file_handle.opened_path = NULL; Index: php4/sapi/tux/php_tux.c diff -u php4/sapi/tux/php_tux.c:1.10 php4/sapi/tux/php_tux.c:1.11 --- php4/sapi/tux/php_tux.c:1.10 Tue Sep 25 17:58:39 2001 +++ php4/sapi/tux/php_tux.c Thu Sep 27 16:01:23 2001 @@ -275,7 +275,7 @@ { zend_file_handle file_handle; - Z_TYPE(file_handle) = ZEND_HANDLE_FILENAME; + file_handle.type = ZEND_HANDLE_FILENAME; file_handle.filename = SG(request_info).path_translated; file_handle.free_filename = 0; file_handle.opened_path = NULL;
« previous php.cvs (#7601) next »