dmitry Wed Mar 1 16:27:47 2006 UTC
Modified files:
/php-src/sapi/apache mod_php5.c
/php-src/sapi/apache2filter apache_config.c
/php-src/sapi/apache2handler apache_config.c
/php-src/sapi/apache_hooks mod_php5.c php_apache.c
/php-src/sapi/cli php_cli_readline.c
Log:
Unicode support: zstr union
http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache/mod_php5.c?r1=1.27&r2=1.28&diff_format=u
Index: php-src/sapi/apache/mod_php5.c
diff -u php-src/sapi/apache/mod_php5.c:1.27 php-src/sapi/apache/mod_php5.c:1.28
--- php-src/sapi/apache/mod_php5.c:1.27 Wed Feb 15 11:07:33 2006
+++ php-src/sapi/apache/mod_php5.c Wed Mar 1 16:27:47 2006
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php5.c,v 1.27 2006/02/15 11:07:33 tony2001 Exp $ */
+/* $Id: mod_php5.c,v 1.28 2006/03/01 16:27:47 dmitry Exp $ */
#include "php_apache_http.h"
#include "http_conf_globals.h"
@@ -718,7 +718,7 @@
{
php_per_dir_entry *orig_per_dir_entry;
- if (zend_u_hash_find(target_ht, hash_key->type, hash_key->u.string,
hash_key->nKeyLength, (void **) &orig_per_dir_entry)==FAILURE) {
+ if (zend_u_hash_find(target_ht, hash_key->type, hash_key->arKey,
hash_key->nKeyLength, (void **) &orig_per_dir_entry)==FAILURE) {
return 1; /* does not exist in dest, copy from source */
}
http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache2filter/apache_config.c?r1=1.35&r2=1.36&diff_format=u
Index: php-src/sapi/apache2filter/apache_config.c
diff -u php-src/sapi/apache2filter/apache_config.c:1.35
php-src/sapi/apache2filter/apache_config.c:1.36
--- php-src/sapi/apache2filter/apache_config.c:1.35 Sun Jan 1 13:09:57 2006
+++ php-src/sapi/apache2filter/apache_config.c Wed Mar 1 16:27:47 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: apache_config.c,v 1.35 2006/01/01 13:09:57 sniper Exp $ */
+/* $Id: apache_config.c,v 1.36 2006/03/01 16:27:47 dmitry Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -131,7 +131,7 @@
php_conf_rec *d = base_conf, *e = new_conf;
php_dir_entry *pe;
php_dir_entry *data;
- char *str;
+ zstr str;
uint str_len;
ulong num_index;
@@ -142,10 +142,10 @@
zend_hash_move_forward(&d->config)) {
pe = NULL;
zend_hash_get_current_data(&d->config, (void **) &data);
- if (zend_hash_find(&e->config, str, str_len, (void **) &pe) ==
SUCCESS) {
+ if (zend_hash_find(&e->config, str.s, str_len, (void **) &pe)
== SUCCESS) {
if (pe->status >= data->status) continue;
}
- zend_hash_update(&e->config, str, str_len, data, sizeof(*data),
NULL);
+ zend_hash_update(&e->config, str.s, str_len, data,
sizeof(*data), NULL);
phpapdebug((stderr, "ADDING/OVERWRITING %s (%d vs. %d)\n", str,
data->status, pe?pe->status:-1));
}
@@ -167,7 +167,7 @@
void apply_config(void *dummy)
{
php_conf_rec *d = dummy;
- char *str;
+ zstr str;
uint str_len;
php_dir_entry *data;
@@ -176,8 +176,8 @@
NULL) == HASH_KEY_IS_STRING;
zend_hash_move_forward(&d->config)) {
zend_hash_get_current_data(&d->config, (void **) &data);
- phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value));
- if (zend_alter_ini_entry(str, str_len, data->value,
data->value_len,
+ phpapdebug((stderr, "APPLYING (%s)(%s)\n", str.s, data->value));
+ if (zend_alter_ini_entry(str.s, str_len, data->value,
data->value_len,
data->status, PHP_INI_STAGE_ACTIVATE)
== FAILURE) {
phpapdebug((stderr, "..FAILED\n"));
}
http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache2handler/apache_config.c?r1=1.8&r2=1.9&diff_format=u
Index: php-src/sapi/apache2handler/apache_config.c
diff -u php-src/sapi/apache2handler/apache_config.c:1.8
php-src/sapi/apache2handler/apache_config.c:1.9
--- php-src/sapi/apache2handler/apache_config.c:1.8 Sun Jan 1 13:09:57 2006
+++ php-src/sapi/apache2handler/apache_config.c Wed Mar 1 16:27:47 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: apache_config.c,v 1.8 2006/01/01 13:09:57 sniper Exp $ */
+/* $Id: apache_config.c,v 1.9 2006/03/01 16:27:47 dmitry Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -121,7 +121,7 @@
php_conf_rec *d = base_conf, *e = new_conf;
php_dir_entry *pe;
php_dir_entry *data;
- char *str;
+ zstr str;
uint str_len;
ulong num_index;
@@ -132,10 +132,10 @@
zend_hash_move_forward(&d->config)) {
pe = NULL;
zend_hash_get_current_data(&d->config, (void **) &data);
- if (zend_hash_find(&e->config, str, str_len, (void **) &pe) ==
SUCCESS) {
+ if (zend_hash_find(&e->config, str.s, str_len, (void **) &pe)
== SUCCESS) {
if (pe->status >= data->status) continue;
}
- zend_hash_update(&e->config, str, str_len, data, sizeof(*data),
NULL);
+ zend_hash_update(&e->config, str.s, str_len, data,
sizeof(*data), NULL);
phpapdebug((stderr, "ADDING/OVERWRITING %s (%d vs. %d)\n", str,
data->status, pe?pe->status:-1));
}
return new_conf;
@@ -156,7 +156,7 @@
void apply_config(void *dummy)
{
php_conf_rec *d = dummy;
- char *str;
+ zstr str;
uint str_len;
php_dir_entry *data;
@@ -165,8 +165,8 @@
NULL) == HASH_KEY_IS_STRING;
zend_hash_move_forward(&d->config)) {
zend_hash_get_current_data(&d->config, (void **) &data);
- phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value));
- if (zend_alter_ini_entry(str, str_len, data->value,
data->value_len, data->status, PHP_INI_STAGE_ACTIVATE) == FAILURE) {
+ phpapdebug((stderr, "APPLYING (%s)(%s)\n", str.s, data->value));
+ if (zend_alter_ini_entry(str.s, str_len, data->value,
data->value_len, data->status, PHP_INI_STAGE_ACTIVATE) == FAILURE) {
phpapdebug((stderr, "..FAILED\n"));
}
}
http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache_hooks/mod_php5.c?r1=1.14&r2=1.15&diff_format=u
Index: php-src/sapi/apache_hooks/mod_php5.c
diff -u php-src/sapi/apache_hooks/mod_php5.c:1.14
php-src/sapi/apache_hooks/mod_php5.c:1.15
--- php-src/sapi/apache_hooks/mod_php5.c:1.14 Sun Jan 1 13:09:57 2006
+++ php-src/sapi/apache_hooks/mod_php5.c Wed Mar 1 16:27:47 2006
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <[EMAIL PROTECTED]>
|
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php5.c,v 1.14 2006/01/01 13:09:57 sniper Exp $ */
+/* $Id: mod_php5.c,v 1.15 2006/03/01 16:27:47 dmitry Exp $ */
#include "php_apache_http.h"
@@ -781,7 +781,7 @@
{
php_per_dir_entry *new_per_dir_entry;
- if (zend_hash_find(target_ht, hash_key->arKey, hash_key->nKeyLength,
(void **) &new_per_dir_entry)==FAILURE) {
+ if (zend_u_hash_find(target_ht, hash_key->type, hash_key->arKey,
hash_key->nKeyLength, (void **) &new_per_dir_entry)==FAILURE) {
return 1; /* does not exist in dest, copy from source */
}
http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache_hooks/php_apache.c?r1=1.22&r2=1.23&diff_format=u
Index: php-src/sapi/apache_hooks/php_apache.c
diff -u php-src/sapi/apache_hooks/php_apache.c:1.22
php-src/sapi/apache_hooks/php_apache.c:1.23
--- php-src/sapi/apache_hooks/php_apache.c:1.22 Sun Jan 1 13:09:57 2006
+++ php-src/sapi/apache_hooks/php_apache.c Wed Mar 1 16:27:47 2006
@@ -17,7 +17,7 @@
| David Sklar <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_apache.c,v 1.22 2006/01/01 13:09:57 sniper Exp $ */
+/* $Id: php_apache.c,v 1.23 2006/03/01 16:27:47 dmitry Exp $ */
#include "php_apache_http.h"
@@ -566,7 +566,7 @@
zval *first = NULL;
zval *second = NULL;
zval **entry, **value;
- char *string_key;
+ zstr string_key;
uint string_key_len;
ulong num_key;
@@ -584,7 +584,7 @@
while
(zend_hash_get_current_data_ex(Z_ARRVAL_P(first), (void **)&entry, &pos) ==
SUCCESS) {
switch(zend_hash_get_current_key_ex(Z_ARRVAL_P(first), &string_key,
&string_key_len, &num_key, 0, &pos)) {
case HASH_KEY_IS_STRING:
- if
(zend_hash_find(Z_ARRVAL_P(first), string_key, string_key_len, (void **)&value)
== FAILURE) {
+ if
(zend_hash_find(Z_ARRVAL_P(first), string_key.s, string_key_len, (void
**)&value) == FAILURE) {
zend_hash_move_forward_ex(Z_ARRVAL_P(first), &pos);
continue;
}
@@ -595,9 +595,9 @@
convert_to_string_ex(value);
if (replace)
- ap_table_set(t,
string_key, Z_STRVAL_PP(value));
+ ap_table_set(t,
string_key.s, Z_STRVAL_PP(value));
else
-
ap_table_merge(t, string_key, Z_STRVAL_PP(value));
+
ap_table_merge(t, string_key.s, Z_STRVAL_PP(value));
break;
case HASH_KEY_IS_LONG:
http://cvs.php.net/viewcvs.cgi/php-src/sapi/cli/php_cli_readline.c?r1=1.9&r2=1.10&diff_format=u
Index: php-src/sapi/cli/php_cli_readline.c
diff -u php-src/sapi/cli/php_cli_readline.c:1.9
php-src/sapi/cli/php_cli_readline.c:1.10
--- php-src/sapi/cli/php_cli_readline.c:1.9 Tue Feb 21 21:04:19 2006
+++ php-src/sapi/cli/php_cli_readline.c Wed Mar 1 16:27:47 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_cli_readline.c,v 1.9 2006/02/21 21:04:19 johannes Exp $ */
+/* $Id: php_cli_readline.c,v 1.10 2006/03/01 16:27:47 dmitry Exp $ */
#include "php.h"
@@ -277,7 +277,7 @@
static char *cli_completion_generator_ht(const char *text, int textlen, int
*state, HashTable *ht, void **pData TSRMLS_DC) /* {{{ */
{
- char *name;
+ zstr name;
ulong number;
if (!(*state % 2)) {
@@ -286,12 +286,12 @@
}
while(zend_hash_has_more_elements(ht) == SUCCESS) {
zend_hash_get_current_key(ht, &name, &number, 0);
- if (!textlen || (UG(unicode) ?
!zend_cmp_unicode_and_string((UChar *)name, (char *)text, textlen) :
!strncmp(name, text, textlen))) {
+ if (!textlen || (UG(unicode) ?
!zend_cmp_unicode_and_string(name.u, (char *)text, textlen) : !strncmp(name.s,
text, textlen))) {
if (pData) {
zend_hash_get_current_data(ht, pData);
}
zend_hash_move_forward(ht);
- return name;
+ return name.s;
}
if (zend_hash_move_forward(ht) == FAILURE) {
break;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php