[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2006-08-14 Thread changelog
changelog   Tue Aug 15 01:30:51 2006 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2422r2=1.2423diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2422 php-src/ChangeLog:1.2423
--- php-src/ChangeLog:1.2422Mon Aug 14 01:30:52 2006
+++ php-src/ChangeLog   Tue Aug 15 01:30:51 2006
@@ -1,3 +1,407 @@
+2006-08-14  Andrei Zmievski  [EMAIL PROTECTED]
+
+* unicode-progress.txt
+  ext/standard/string.c:
+  Unicode support for strcoll().
+
+* ZendEngine2/zend_builtin_functions.c:
+  Remove UTODO's -- this is handled during name mangling/unmangling.
+
+2006-08-14  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  run-tests.php:
+  fix previous patch
+
+* run-tests.php:
+  fix my previous patch
+
+2006-08-14  Andrei Zmievski  [EMAIL PROTECTED]
+
+* ZendEngine2/zend_API.c
+  ZendEngine2/zend_API.h:
+  add_next_index_zstr[l]()
+
+* unicode-progress.txt
+  ext/standard/string.c:
+  Unicode support for str_split().
+
+* ZendEngine2/zend_API.c:
+  Typo.
+
+* unicode-progress.txt
+  ext/standard/string.c:
+  Unicode support in chunk_split().
+
+* ZendEngine2/zend_API.c:
+  Set T_arg_type to default string type if we were not able to determine
+  it from the args.
+
+2006-08-14  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS:
+  BFN
+
+* (PHP_5_2)
+  ext/pdo_mysql/config.m4:
+  fix #38451 (PDO_MYSQL doesn't compile on Solaris)
+
+2006-08-14  Nuno Lopes  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/bz2/bz2.c
+  ext/bz2/php_bz2.h
+  ext/ctype/ctype.c
+  ext/ctype/php_ctype.h
+  ext/json/json.c
+  ext/json/php_json.h
+  ext/pspell/php_pspell.h
+  ext/pspell/pspell.c
+  ext/tidy/php_tidy.h
+  ext/tidy/tidy.c
+  ext/zlib/php_zlib.h
+  ext/zlib/zlib.c
+  ext/zlib/zlib_fopen_wrapper.c:
+  move static declaration to *.c files
+  mroe static/const keywording
+
+2006-08-14  Michael Wallner  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/date/php_date.c
+  ext/date/tests/oo_002.phpt:
+  MFH: add cloning support to DateTime classes
+
+* ext/date/php_date.c
+  ext/date/tests/oo_002.phpt
+  ext/date/tests/oo_002.phpt:
+  - add cloning support to DateTime classes
+
+2006-08-14  Frank M. Kromann  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  php.ini-dist
+  php.ini-dist
+  php.ini-recommended
+  php.ini-recommended
+  ext/fbsql/php_fbsql.c
+  ext/fbsql/php_fbsql.c
+  ext/fbsql/php_fbsql.h
+  ext/fbsql/php_fbsql.h:
+  MFH: Cleanup before reusing failed persistant connection. Better 
formating
+  of timestamp and decimal values
+
+* php.ini-dist
+  php.ini-recommended
+  ext/fbsql/php_fbsql.c
+  ext/fbsql/php_fbsql.h:
+  Cleanup before reusing failed persistant connection. Better formating of
+  timestamp and decimal values
+
+2006-08-14  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/pdo_sqlite/config.m4
+  ext/pdo_sqlite/config.w32
+  ext/pdo_sqlite/package.xml
+  ext/pdo_sqlite/sqlite/Makefile.in
+  ext/pdo_sqlite/sqlite/Makefile.linux-gcc
+  ext/pdo_sqlite/sqlite/VERSION
+  ext/pdo_sqlite/sqlite/aclocal.m4
+  ext/pdo_sqlite/sqlite/configure
+  ext/pdo_sqlite/sqlite/configure.ac
+  ext/pdo_sqlite/sqlite/main.mk
+  ext/pdo_sqlite/sqlite/mkdll.sh
+  ext/pdo_sqlite/sqlite/mkopcodeh.awk
+  ext/pdo_sqlite/sqlite/publish.sh
+  ext/pdo_sqlite/sqlite/sqlite3.def
+  ext/pdo_sqlite/sqlite/src/alter.c
+  ext/pdo_sqlite/sqlite/src/analyze.c
+  ext/pdo_sqlite/sqlite/src/attach.c
+  ext/pdo_sqlite/sqlite/src/auth.c
+  ext/pdo_sqlite/sqlite/src/btree.c
+  ext/pdo_sqlite/sqlite/src/btree.h
+  ext/pdo_sqlite/sqlite/src/build.c
+  ext/pdo_sqlite/sqlite/src/callback.c
+  ext/pdo_sqlite/sqlite/src/complete.c
+  ext/pdo_sqlite/sqlite/src/date.c
+  ext/pdo_sqlite/sqlite/src/delete.c
+  ext/pdo_sqlite/sqlite/src/experimental.c
+  ext/pdo_sqlite/sqlite/src/expr.c
+  ext/pdo_sqlite/sqlite/src/func.c
+  ext/pdo_sqlite/sqlite/src/hash.c
+  ext/pdo_sqlite/sqlite/src/hash.h
+  ext/pdo_sqlite/sqlite/src/insert.c
+  ext/pdo_sqlite/sqlite/src/keywordhash.h
+  ext/pdo_sqlite/sqlite/src/legacy.c
+  ext/pdo_sqlite/sqlite/src/loadext.c
+  ext/pdo_sqlite/sqlite/src/main.c
+  ext/pdo_sqlite/sqlite/src/opcodes.h
+  ext/pdo_sqlite/sqlite/src/os.c
+  ext/pdo_sqlite/sqlite/src/os.h
+  ext/pdo_sqlite/sqlite/src/os_common.h
+  ext/pdo_sqlite/sqlite/src/os_mac.c
+  ext/pdo_sqlite/sqlite/src/os_mac.h
+  ext/pdo_sqlite/sqlite/src/os_unix.c
+  ext/pdo_sqlite/sqlite/src/os_win.c
+  ext/pdo_sqlite/sqlite/src/pager.c
+  ext/pdo_sqlite/sqlite/src/pager.h
+  ext/pdo_sqlite/sqlite/src/parse.c
+  

[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2006-08-14 Thread changelog
changelog   Tue Aug 15 01:30:54 2006 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.964r2=1.965diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.964 ZendEngine2/ChangeLog:1.965
--- ZendEngine2/ChangeLog:1.964 Fri Aug 11 01:30:59 2006
+++ ZendEngine2/ChangeLog   Tue Aug 15 01:30:54 2006
@@ -1,3 +1,19 @@
+2006-08-14  Andrei Zmievski  [EMAIL PROTECTED]
+
+* zend_builtin_functions.c:
+  Remove UTODO's -- this is handled during name mangling/unmangling.
+
+* zend_API.c
+  zend_API.h:
+  add_next_index_zstr[l]()
+
+* zend_API.c:
+  Typo.
+
+* zend_API.c:
+  Set T_arg_type to default string type if we were not able to determine
+  it from the args.
+
 2006-08-10  Ilia Alshanetsky  [EMAIL PROTECTED]
 
 * (PHP_5_1)
@@ -14933,7 +14949,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.964 2006/08/11 01:30:59 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.965 2006/08/15 01:30:54 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -16657,7 +16673,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.964 2006/08/11 01:30:59 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.965 2006/08/15 01:30:54 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src /ext/xmlrpc xmlrpc-epi-php.c /ext/xmlrpc/tests 001.phpt 002.phpt

2006-08-14 Thread Antony Dovgal
tony2001Mon Aug 14 08:15:44 2006 UTC

  Added files: 
/php-src/ext/xmlrpc/tests   001.phpt 002.phpt 

  Modified files:  
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  fix segfault and leak in ext/xmlrpc
  add tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.45r2=1.46diff_format=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.45 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.46
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.45Fri Aug 11 17:41:49 2006
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Mon Aug 14 08:15:44 2006
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.45 2006/08/11 17:41:49 tony2001 Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.46 2006/08/14 08:15:44 tony2001 Exp $ */
 
 /**
 * BUGS:   *
@@ -670,6 +670,7 @@
if (Z_TYPE_PP(method) == IS_NULL) {
XMLRPC_RequestSetRequestType(xRequest, 
xmlrpc_request_response);
} else {
+   convert_to_string_ex(method);
XMLRPC_RequestSetMethodName(xRequest, 
Z_STRVAL_PP(method));
XMLRPC_RequestSetRequestType(xRequest, 
xmlrpc_request_call);
}
@@ -739,7 +740,7 @@
 
   if(XMLRPC_RequestGetRequestType(response) == xmlrpc_request_call) {
  if(method_name_out) {
-convert_to_string(method_name_out);
+zval_dtor(method_name_out);
 Z_TYPE_P(method_name_out) = IS_STRING;
 Z_STRVAL_P(method_name_out) = 
estrdup(XMLRPC_RequestGetMethodName(response));
 Z_STRLEN_P(method_name_out) = strlen(Z_STRVAL_P(method_name_out));

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/tests/001.phpt?view=markuprev=1.1
Index: php-src/ext/xmlrpc/tests/001.phpt
+++ php-src/ext/xmlrpc/tests/001.phpt
--TEST--
xmlrpc_encode_request() with wrong arguments
--SKIPIF--
?php if (!extension_loaded(xmlrpc)) print skip; ?
--FILE--
?php

var_dump(xmlrpc_encode_request(-1, 1));
var_dump(xmlrpc_encode_request(, 1));
var_dump(xmlrpc_encode_request(array(), 1));
var_dump(xmlrpc_encode_request(3.4, 1));

echo Done\n;
?
--EXPECTF-- 
string(174) ?xml version=1.0 encoding=iso-8859-1?
methodCall
methodName-1/methodName
params
 param
  value
   int1/int
  /value
 /param
/params
/methodCall

string(160) ?xml version=1.0 encoding=iso-8859-1?
methodCall
methodName/
params
 param
  value
   int1/int
  /value
 /param
/params
/methodCall


Notice: Array to string conversion in %s on line %d
string(177) ?xml version=1.0 encoding=iso-8859-1?
methodCall
methodNameArray/methodName
params
 param
  value
   int1/int
  /value
 /param
/params
/methodCall

string(175) ?xml version=1.0 encoding=iso-8859-1?
methodCall
methodName3.4/methodName
params
 param
  value
   int1/int
  /value
 /param
/params
/methodCall

Done

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/tests/002.phpt?view=markuprev=1.1
Index: php-src/ext/xmlrpc/tests/002.phpt
+++ php-src/ext/xmlrpc/tests/002.phpt
--TEST--
xmlrpc_encode_request() and various arguments
--SKIPIF--
?php if (!extension_loaded(xmlrpc)) print skip; ?
--FILE--
?php

$r = xmlrpc_encode_request(method, array());
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

$r = xmlrpc_encode_request(method, 1);
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

$r = xmlrpc_encode_request(method, 'param');
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

$r = xmlrpc_encode_request(-1, );
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

$r = xmlrpc_encode_request(array(), 1);
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

echo Done\n;
?
--EXPECTF-- 
array(0) {
}
string(6) method
array(1) {
  [0]=
  int(1)
}
string(6) method
array(1) {
  [0]=
  string(5) param
}
string(6) method
array(1) {
  [0]=
  string(0) 
}
string(2) -1

Notice: Array to string conversion in %s on line %d
array(1) {
  [0]=
  int(1)
}
string(5) Array
Done

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/xmlrpc xmlrpc-epi-php.c /ext/xmlrpc/tests 001.phpt 002.phpt

2006-08-14 Thread Antony Dovgal
tony2001Mon Aug 14 08:18:01 2006 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/xmlrpc/tests   001.phpt 002.phpt 

  Modified files:  
/php-src/ext/xmlrpc xmlrpc-epi-php.c 
  Log:
  fix segfault and leak in ext/xmlrpc
  add tests
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/xmlrpc-epi-php.c?r1=1.39.2.5.2.1r2=1.39.2.5.2.2diff_format=u
Index: php-src/ext/xmlrpc/xmlrpc-epi-php.c
diff -u php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.1 
php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.2
--- php-src/ext/xmlrpc/xmlrpc-epi-php.c:1.39.2.5.2.1Fri Aug 11 17:43:04 2006
+++ php-src/ext/xmlrpc/xmlrpc-epi-php.c Mon Aug 14 08:18:01 2006
@@ -51,7 +51,7 @@
+--+
  */
 
-/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.1 2006/08/11 17:43:04 tony2001 Exp $ */
+/* $Id: xmlrpc-epi-php.c,v 1.39.2.5.2.2 2006/08/14 08:18:01 tony2001 Exp $ */
 
 /**
 * BUGS:   *
@@ -671,6 +671,7 @@
if (Z_TYPE_PP(method) == IS_NULL) {
XMLRPC_RequestSetRequestType(xRequest, 
xmlrpc_request_response);
} else {
+   convert_to_string_ex(method);
XMLRPC_RequestSetMethodName(xRequest, 
Z_STRVAL_PP(method));
XMLRPC_RequestSetRequestType(xRequest, 
xmlrpc_request_call);
}
@@ -740,7 +741,7 @@
 
   if(XMLRPC_RequestGetRequestType(response) == xmlrpc_request_call) {
  if(method_name_out) {
-convert_to_string(method_name_out);
+zval_dtor(method_name_out);
 Z_TYPE_P(method_name_out) = IS_STRING;
 Z_STRVAL_P(method_name_out) = 
estrdup(XMLRPC_RequestGetMethodName(response));
 Z_STRLEN_P(method_name_out) = strlen(Z_STRVAL_P(method_name_out));

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/tests/001.phpt?view=markuprev=1.1
Index: php-src/ext/xmlrpc/tests/001.phpt
+++ php-src/ext/xmlrpc/tests/001.phpt
--TEST--
xmlrpc_encode_request() with wrong arguments
--SKIPIF--
?php if (!extension_loaded(xmlrpc)) print skip; ?
--FILE--
?php

var_dump(xmlrpc_encode_request(-1, 1));
var_dump(xmlrpc_encode_request(, 1));
var_dump(xmlrpc_encode_request(array(), 1));
var_dump(xmlrpc_encode_request(3.4, 1));

echo Done\n;
?
--EXPECTF-- 
string(174) ?xml version=1.0 encoding=iso-8859-1?
methodCall
methodName-1/methodName
params
 param
  value
   int1/int
  /value
 /param
/params
/methodCall

string(160) ?xml version=1.0 encoding=iso-8859-1?
methodCall
methodName/
params
 param
  value
   int1/int
  /value
 /param
/params
/methodCall


Notice: Array to string conversion in %s on line %d
string(177) ?xml version=1.0 encoding=iso-8859-1?
methodCall
methodNameArray/methodName
params
 param
  value
   int1/int
  /value
 /param
/params
/methodCall

string(175) ?xml version=1.0 encoding=iso-8859-1?
methodCall
methodName3.4/methodName
params
 param
  value
   int1/int
  /value
 /param
/params
/methodCall

Done

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlrpc/tests/002.phpt?view=markuprev=1.1
Index: php-src/ext/xmlrpc/tests/002.phpt
+++ php-src/ext/xmlrpc/tests/002.phpt
--TEST--
xmlrpc_encode_request() and various arguments
--SKIPIF--
?php if (!extension_loaded(xmlrpc)) print skip; ?
--FILE--
?php

$r = xmlrpc_encode_request(method, array());
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

$r = xmlrpc_encode_request(method, 1);
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

$r = xmlrpc_encode_request(method, 'param');
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

$r = xmlrpc_encode_request(-1, );
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

$r = xmlrpc_encode_request(array(), 1);
var_dump(xmlrpc_decode_request($r, $method));
var_dump($method);

echo Done\n;
?
--EXPECTF-- 
array(0) {
}
string(6) method
array(1) {
  [0]=
  int(1)
}
string(6) method
array(1) {
  [0]=
  string(5) param
}
string(6) method
array(1) {
  [0]=
  string(0) 
}
string(2) -1

Notice: Array to string conversion in %s on line %d
array(1) {
  [0]=
  int(1)
}
string(5) Array
Done

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src / run-tests.php

2006-08-14 Thread Antony Dovgal
tony2001Mon Aug 14 10:29:11 2006 UTC

  Modified files:  
/php-srcrun-tests.php 
  Log:
  make sure USE_ZEND_ALLOC is always 1 when running tests without -m
  
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.302r2=1.303diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.302 php-src/run-tests.php:1.303
--- php-src/run-tests.php:1.302 Sun Aug 13 15:22:18 2006
+++ php-src/run-tests.php   Mon Aug 14 10:29:10 2006
@@ -23,7 +23,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.302 2006/08/13 15:22:18 helly Exp $ */
+/* $Id: run-tests.php,v 1.303 2006/08/14 10:29:10 tony2001 Exp $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is 
available.
  * In the event it is not, print a nice error message indicating that this 
script will
@@ -400,7 +400,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.302 $'.\n;
+   echo '$Revision: 1.303 $'.\n;
exit(1);
default:
echo Illegal switch specified!\n;
@@ -1360,7 +1360,7 @@
return 'BORKED';
}
save_text($tmp_post, $request);
-   $cmd = $php$pass_options$ini_settings -f \$test_file\ 21  
$tmp_post;
+   $cmd = USE_ZEND_ALLOC=1 $php$pass_options$ini_settings -f 
\$test_file\ 21  $tmp_post;
} elseif (array_key_exists('POST', $section_text)  
!empty($section_text['POST'])) {
 
$post = trim($section_text['POST']);
@@ -1371,7 +1371,7 @@
$env['CONTENT_TYPE']   = 'application/x-www-form-urlencoded';
$env['CONTENT_LENGTH'] = $content_length;
 
-   $cmd = $php$pass_options$ini_settings -f \$test_file\ 21  
$tmp_post;
+   $cmd = USE_ZEND_ALLOC=1 $php$pass_options$ini_settings -f 
\$test_file\ 21  $tmp_post;
 
} else {
 
@@ -1379,7 +1379,7 @@
$env['CONTENT_TYPE']   = '';
$env['CONTENT_LENGTH'] = '';
 
-   $cmd = $php$pass_options$ini_settings -f \$test_file\ $args 
21;
+   $cmd = USE_ZEND_ALLOC=1 $php$pass_options$ini_settings -f 
\$test_file\ $args 21;
}
 
if ($leak_check) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / run-tests.php

2006-08-14 Thread Antony Dovgal
tony2001Mon Aug 14 10:29:20 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcrun-tests.php 
  Log:
  make sure USE_ZEND_ALLOC is always 1
  
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.10r2=1.226.2.37.2.11diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.10 
php-src/run-tests.php:1.226.2.37.2.11
--- php-src/run-tests.php:1.226.2.37.2.10   Mon Aug  7 21:27:40 2006
+++ php-src/run-tests.php   Mon Aug 14 10:29:20 2006
@@ -23,7 +23,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.226.2.37.2.10 2006/08/07 21:27:40 tony2001 Exp $ */
+/* $Id: run-tests.php,v 1.226.2.37.2.11 2006/08/14 10:29:20 tony2001 Exp $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is 
available.
  * In the event it is not, print a nice error message indicating that this 
script will
@@ -397,7 +397,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.226.2.37.2.10 
$'.\n;
+   echo '$Revision: 1.226.2.37.2.11 
$'.\n;
exit(1);
default:
echo Illegal switch '$switch' 
specified!\n;
@@ -1307,7 +1307,7 @@
return 'BORKED';
}
save_text($tmp_post, $request);
-   $cmd = $php$pass_options$ini_settings -f \$test_file\ 21  
$tmp_post;
+   $cmd = USE_ZEND_ALLOC=1 $php$pass_options$ini_settings -f 
\$test_file\ 21  $tmp_post;
} elseif (array_key_exists('POST', $section_text)  
!empty($section_text['POST'])) {
 
$post = trim($section_text['POST']);
@@ -1318,7 +1318,7 @@
$env['CONTENT_TYPE']   = 'application/x-www-form-urlencoded';
$env['CONTENT_LENGTH'] = $content_length;
 
-   $cmd = $php$pass_options$ini_settings -f \$test_file\ 21  
$tmp_post;
+   $cmd = USE_ZEND_ALLOC=1 $php$pass_options$ini_settings -f 
\$test_file\ 21  $tmp_post;
 
} else {
 
@@ -1326,7 +1326,7 @@
$env['CONTENT_TYPE']   = '';
$env['CONTENT_LENGTH'] = '';
 
-   $cmd = $php$pass_options$ini_settings -f \$test_file\ $args 
21;
+   $cmd = USE_ZEND_ALLOC=1 $php$pass_options$ini_settings -f 
\$test_file\ $args 21;
}
 
if ($leak_check) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/dom php_dom.c

2006-08-14 Thread Rob Richards
rrichards   Mon Aug 14 11:29:16 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/domphp_dom.c 
  Log:
  fix underlying issue for bug #38438
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.73.2.12.2.6r2=1.73.2.12.2.7diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.73.2.12.2.6 
php-src/ext/dom/php_dom.c:1.73.2.12.2.7
--- php-src/ext/dom/php_dom.c:1.73.2.12.2.6 Tue Jun  6 12:08:11 2006
+++ php-src/ext/dom/php_dom.c   Mon Aug 14 11:29:15 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.73.2.12.2.6 2006/06/06 12:08:11 rrichards Exp $ */
+/* $Id: php_dom.c,v 1.73.2.12.2.7 2006/08/14 11:29:15 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -228,7 +228,7 @@
 /* {{{ xmlNodePtr dom_object_get_node(dom_object *obj) */
 PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj)
 {
-   if (obj-ptr != NULL) {
+   if (obj  obj-ptr != NULL) {
return ((php_libxml_node_ptr *)obj-ptr)-node;
} else {
return NULL;
@@ -239,7 +239,7 @@
 /* {{{ dom_object *php_dom_object_get_data(xmlNodePtr obj) */
 PHP_DOM_EXPORT dom_object *php_dom_object_get_data(xmlNodePtr obj)
 {
-   if (obj-_private != NULL) {
+   if (obj  obj-_private != NULL) {
return (dom_object *) ((php_libxml_node_ptr *) 
obj-_private)-_private;
} else {
return NULL;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/dom php_dom.c

2006-08-14 Thread Rob Richards
rrichards   Mon Aug 14 11:29:49 2006 UTC

  Modified files:  
/php-src/ext/domphp_dom.c 
  Log:
  MFB: fix underlying issue for bug #38438
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.96r2=1.97diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.96 php-src/ext/dom/php_dom.c:1.97
--- php-src/ext/dom/php_dom.c:1.96  Fri Jun  2 21:55:26 2006
+++ php-src/ext/dom/php_dom.c   Mon Aug 14 11:29:49 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.96 2006/06/02 21:55:26 tony2001 Exp $ */
+/* $Id: php_dom.c,v 1.97 2006/08/14 11:29:49 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -205,7 +205,7 @@
 /* {{{ xmlNodePtr dom_object_get_node(dom_object *obj) */
 PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj)
 {
-   if (obj-ptr != NULL) {
+   if (obj  obj-ptr != NULL) {
return ((php_libxml_node_ptr *)obj-ptr)-node;
} else {
return NULL;
@@ -216,7 +216,7 @@
 /* {{{ dom_object *php_dom_object_get_data(xmlNodePtr obj) */
 PHP_DOM_EXPORT dom_object *php_dom_object_get_data(xmlNodePtr obj)
 {
-   if (obj-_private != NULL) {
+   if (obj  obj-_private != NULL) {
return (dom_object *) ((php_libxml_node_ptr *) 
obj-_private)-_private;
} else {
return NULL;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/simplexml simplexml.c /ext/simplexml/tests bug38424.phpt

2006-08-14 Thread Rob Richards
rrichards   Mon Aug 14 11:57:50 2006 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/simplexml/testsbug38424.phpt 

  Modified files:  
/php-src/ext/simplexml  simplexml.c 
  Log:
  fix bug #38424 (Different attribute assignment if new or existing)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.13r2=1.151.2.22.2.14diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.13 
php-src/ext/simplexml/simplexml.c:1.151.2.22.2.14
--- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.13   Mon Aug  7 10:15:12 2006
+++ php-src/ext/simplexml/simplexml.c   Mon Aug 14 11:57:50 2006
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.151.2.22.2.13 2006/08/07 10:15:12 rrichards Exp $ */
+/* $Id: simplexml.c,v 1.151.2.22.2.14 2006/08/14 11:57:50 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -366,6 +366,8 @@
 static void change_node_zval(xmlNodePtr node, zval *value TSRMLS_DC)
 {
zval value_copy;
+   xmlChar *buffer;
+   int buffer_len;
 
if (!value)
{
@@ -385,7 +387,20 @@
convert_to_string(value);
/* break missing intentionally */
case IS_STRING:
-   xmlNodeSetContentLen(node, (xmlChar 
*)Z_STRVAL_P(value), Z_STRLEN_P(value));
+   if (node-type == XML_ATTRIBUTE_NODE) {
+   buffer = xmlEncodeEntitiesReentrant(node-doc, 
(xmlChar *)Z_STRVAL_P(value));
+   buffer_len = xmlStrlen(buffer);
+   } else {
+   buffer = (xmlChar *)Z_STRVAL_P(value);
+   buffer_len = Z_STRLEN_P(value);
+   }
+   /* check for NULL buffer in case of memory error in 
xmlEncodeEntitiesReentrant */
+   if (buffer) {
+   xmlNodeSetContentLen(node, buffer, buffer_len);
+   if (node-type == XML_ATTRIBUTE_NODE) {
+   xmlFree(buffer);
+   }
+   }
if (value == value_copy) {
zval_dtor(value);
}
@@ -2316,7 +2331,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.13 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.14 $);
php_info_print_table_row(2, Schema support,
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);

http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug38424.phpt?view=markuprev=1.1
Index: php-src/ext/simplexml/tests/bug38424.phpt
+++ php-src/ext/simplexml/tests/bug38424.phpt

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/simplexml simplexml.c /ext/simplexml/tests bug38424.phpt

2006-08-14 Thread Rob Richards
rrichards   Mon Aug 14 11:58:49 2006 UTC

  Modified files:  
/php-src/ext/simplexml  simplexml.c 
/php-src/ext/simplexml/testsbug38424.phpt 
  Log:
  MFB: fix bug #38424 (Different attribute assignment if new or existing)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.216r2=1.217diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.216 
php-src/ext/simplexml/simplexml.c:1.217
--- php-src/ext/simplexml/simplexml.c:1.216 Tue Aug  8 20:52:45 2006
+++ php-src/ext/simplexml/simplexml.c   Mon Aug 14 11:58:49 2006
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.216 2006/08/08 20:52:45 rrichards Exp $ */
+/* $Id: simplexml.c,v 1.217 2006/08/14 11:58:49 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -366,6 +366,8 @@
 static void change_node_zval(xmlNodePtr node, zval *value TSRMLS_DC)
 {
zval value_copy;
+   xmlChar *buffer;
+   int buffer_len;
 
if (!value)
{
@@ -386,7 +388,20 @@
convert_to_string_with_converter(value, UG(utf8_conv));
/* break missing intentionally */
case IS_STRING:
-   xmlNodeSetContentLen(node, (xmlChar 
*)Z_STRVAL_P(value), Z_STRLEN_P(value));
+   if (node-type == XML_ATTRIBUTE_NODE) {
+   buffer = xmlEncodeEntitiesReentrant(node-doc, 
(xmlChar *)Z_STRVAL_P(value));
+   buffer_len = xmlStrlen(buffer);
+   } else {
+   buffer = (xmlChar *)Z_STRVAL_P(value);
+   buffer_len = Z_STRLEN_P(value);
+   }
+   /* check for NULL buffer in case of memory error in 
xmlEncodeEntitiesReentrant */
+   if (buffer) {
+   xmlNodeSetContentLen(node, buffer, buffer_len);
+   if (node-type == XML_ATTRIBUTE_NODE) {
+   xmlFree(buffer);
+   }
+   }
if (value == value_copy) {
zval_dtor(value);
}
@@ -2324,7 +2339,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.216 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.217 $);
php_info_print_table_row(2, Schema support,
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/tests/bug38424.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/simplexml/tests/bug38424.phpt
diff -u /dev/null php-src/ext/simplexml/tests/bug38424.phpt:1.2
--- /dev/null   Mon Aug 14 11:58:49 2006
+++ php-src/ext/simplexml/tests/bug38424.phpt   Mon Aug 14 11:58:49 2006
@@ -0,0 +1,26 @@
+--TEST--
+Bug #38424 (Different attribute assignment if new or exists)
+--SKIPIF--
+?php if (!extension_loaded(simplexml)) print skip; ?
+--FILE--
+?php
+
+$xml = simplexml_load_string(b'xml/xml');
+
+$str = abc  def ;
+
+$xml[a1] =  ;
+$xml[a1] = htmlspecialchars($str,ENT_NOQUOTES) ;
+
+$xml[a2] = htmlspecialchars($str,ENT_NOQUOTES) ;
+
+$xml[a3] =  ;
+$xml[a3] = $str ;
+
+$xml[a4] = $str ;
+
+echo $xml-asXML();
+?
+--EXPECT-- 
+?xml version=1.0?
+xml a1=abc amp;amp; def a2=abc amp;amp; def a3=abc amp; def a4=abc 
amp; def/

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/standard string.c

2006-08-14 Thread Edin Kadribasic
edink   Mon Aug 14 11:59:07 2006 UTC

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  Fixed windows build.
  Looking at the macro definition it seems that the second argument
  to U_STRING_DECL can only be a string literal, not an indetifier.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.575r2=1.576diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.575 php-src/ext/standard/string.c:1.576
--- php-src/ext/standard/string.c:1.575 Thu Aug 10 19:02:32 2006
+++ php-src/ext/standard/string.c   Mon Aug 14 11:59:07 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.575 2006/08/10 19:02:32 iliaa Exp $ */
+/* $Id: string.c,v 1.576 2006/08/14 11:59:07 edink Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -6777,8 +6777,9 @@
 
 static char rot13_from[] = 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ;
 static char rot13_to[] = 
nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM;
-U_STRING_DECL(u_rot13_from, rot13_from, sizeof(rot13_from)-1);
-U_STRING_DECL(u_rot13_to, rot13_to, sizeof(rot13_to)-1);
+U_STRING_DECL(u_rot13_from, 
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ, sizeof(rot13_from)-1);
+U_STRING_DECL(u_rot13_to, 
nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM, sizeof(rot13_to)-1);
+
 
 /* {{{ proto string str_rot13(string str) U
Perform the rot13 transform on a string */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2006-08-14 Thread Rob Richards
rrichards   Mon Aug 14 11:59:25 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  fix typo
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.198r2=1.2027.2.547.2.199diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.198 php-src/NEWS:1.2027.2.547.2.199
--- php-src/NEWS:1.2027.2.547.2.198 Sun Aug 13 15:02:40 2006
+++ php-src/NEWSMon Aug 14 11:59:24 2006
@@ -37,8 +37,9 @@
 - Fixed phpinfo() cutoff of variables at \0. (Ilia)
 - Fixed a bug in the filter extension that prevented magic_quotes_gpc from
   being applied when RAW filter is used. (Ilia)
-- FixedbBug #38438 (DOMNodeList-item(0) segfault on empty NodeList). (Ilia)
+- Fixed bug #38438 (DOMNodeList-item(0) segfault on empty NodeList). (Ilia)
 - Fixed bug #38431 (xmlrpc_get_type() crashes PHP on objects). (Tony)
+- Fixed bug #38424 (Different attribute assignment if new or existing). (Rob)
 - Fixed bug #38394 (PDO fails to recover from failed prepared statement
   execution). (Ilia)
 - Fixed bug #38377 (session_destroy() gives warning after

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/tidy README libtidy.txt php_tidy.h tidy.c

2006-08-14 Thread Nuno Lopes
nlopess Mon Aug 14 15:09:08 2006 UTC

  Removed files:   (Branch: PHP_5_2)
/php-src/ext/tidy   libtidy.txt 

  Modified files:  
/php-src/ext/tidy   README php_tidy.h tidy.c 
  Log:
  more static keywording
  also remove the libtidy patch, as it is too old. users should use a newer 
libtify anyway
  http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/README?r1=1.4r2=1.4.6.1diff_format=u
Index: php-src/ext/tidy/README
diff -u php-src/ext/tidy/README:1.4 php-src/ext/tidy/README:1.4.6.1
--- php-src/ext/tidy/README:1.4 Mon Jan 12 10:02:04 2004
+++ php-src/ext/tidy/README Mon Aug 14 15:09:08 2006
@@ -5,12 +5,3 @@
 Tidy is an extension based on Libtidy (http://tidy.sf.net/) and allows a PHP 
developer
 to clean, repair, and traverse HTML, XHTML, and XML documents -- including 
ones with
 embedded scripting languages such as PHP or ASP within them using OO 
constructs.
-

-!! Important Note !!

-Older versions of libtidy have a small memory leak inside the 
ParseConfigFileEnc() function
-used to load configuration from a file. If you intend to use this 
functionality apply
-the libtidy.txt patch (cd tidy/src/; patch -p0  libtidy.txt) to libtidy 
sources and
-then recompile libtidy.

http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/php_tidy.h?r1=1.26.2.1.2.1r2=1.26.2.1.2.2diff_format=u
Index: php-src/ext/tidy/php_tidy.h
diff -u php-src/ext/tidy/php_tidy.h:1.26.2.1.2.1 
php-src/ext/tidy/php_tidy.h:1.26.2.1.2.2
--- php-src/ext/tidy/php_tidy.h:1.26.2.1.2.1Wed May 24 21:22:13 2006
+++ php-src/ext/tidy/php_tidy.h Mon Aug 14 15:09:08 2006
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_tidy.h,v 1.26.2.1.2.1 2006/05/24 21:22:13 tony2001 Exp $ */
+/* $Id: php_tidy.h,v 1.26.2.1.2.2 2006/08/14 15:09:08 nlopess Exp $ */
 
 #ifndef PHP_TIDY_H
 #define PHP_TIDY_H
@@ -39,57 +39,57 @@
 #define TIDY_ATTR_METHOD(name)PHP_FUNCTION(tam_ ##name)
 #define TIDY_ATTR_ME(name, param) TIDY_METHOD_MAP(name, tam_ ##name, param)
 
-PHP_MINIT_FUNCTION(tidy);
-PHP_MSHUTDOWN_FUNCTION(tidy);
-PHP_RINIT_FUNCTION(tidy);
-PHP_MINFO_FUNCTION(tidy);
-
-PHP_FUNCTION(tidy_getopt);
-PHP_FUNCTION(tidy_parse_string);
-PHP_FUNCTION(tidy_parse_file);
-PHP_FUNCTION(tidy_clean_repair);
-PHP_FUNCTION(tidy_repair_string);
-PHP_FUNCTION(tidy_repair_file);
-PHP_FUNCTION(tidy_diagnose);
-PHP_FUNCTION(tidy_get_output);
-PHP_FUNCTION(tidy_get_error_buffer);
-PHP_FUNCTION(tidy_get_release);
-PHP_FUNCTION(tidy_reset_config);
-PHP_FUNCTION(tidy_get_config);
-PHP_FUNCTION(tidy_get_status);
-PHP_FUNCTION(tidy_get_html_ver);
+static PHP_MINIT_FUNCTION(tidy);
+static PHP_MSHUTDOWN_FUNCTION(tidy);
+static PHP_RINIT_FUNCTION(tidy);
+static PHP_MINFO_FUNCTION(tidy);
+
+static PHP_FUNCTION(tidy_getopt);
+static PHP_FUNCTION(tidy_parse_string);
+static PHP_FUNCTION(tidy_parse_file);
+static PHP_FUNCTION(tidy_clean_repair);
+static PHP_FUNCTION(tidy_repair_string);
+static PHP_FUNCTION(tidy_repair_file);
+static PHP_FUNCTION(tidy_diagnose);
+static PHP_FUNCTION(tidy_get_output);
+static PHP_FUNCTION(tidy_get_error_buffer);
+static PHP_FUNCTION(tidy_get_release);
+static PHP_FUNCTION(tidy_reset_config);
+static PHP_FUNCTION(tidy_get_config);
+static PHP_FUNCTION(tidy_get_status);
+static PHP_FUNCTION(tidy_get_html_ver);
 #if HAVE_TIDYOPTGETDOC
-PHP_FUNCTION(tidy_get_opt_doc);
+static PHP_FUNCTION(tidy_get_opt_doc);
 #endif
-PHP_FUNCTION(tidy_is_xhtml);
-PHP_FUNCTION(tidy_is_xml);
-PHP_FUNCTION(tidy_error_count);
-PHP_FUNCTION(tidy_warning_count);
-PHP_FUNCTION(tidy_access_count);
-PHP_FUNCTION(tidy_config_count);
-
-PHP_FUNCTION(ob_tidyhandler);
-
-PHP_FUNCTION(tidy_get_root);
-PHP_FUNCTION(tidy_get_html);
-PHP_FUNCTION(tidy_get_head);
-PHP_FUNCTION(tidy_get_body);
-
-TIDY_DOC_METHOD(__construct);
-TIDY_DOC_METHOD(parseFile);
-TIDY_DOC_METHOD(parseString);
-
-TIDY_NODE_METHOD(__construct);
-TIDY_NODE_METHOD(hasChildren);
-TIDY_NODE_METHOD(hasSiblings);
-TIDY_NODE_METHOD(isComment);
-TIDY_NODE_METHOD(isHtml);
-TIDY_NODE_METHOD(isXhtml);
-TIDY_NODE_METHOD(isXml);
-TIDY_NODE_METHOD(isText);
-TIDY_NODE_METHOD(isJste);
-TIDY_NODE_METHOD(isAsp);
-TIDY_NODE_METHOD(isPhp);
+static PHP_FUNCTION(tidy_is_xhtml);
+static PHP_FUNCTION(tidy_is_xml);
+static PHP_FUNCTION(tidy_error_count);
+static PHP_FUNCTION(tidy_warning_count);
+static PHP_FUNCTION(tidy_access_count);
+static PHP_FUNCTION(tidy_config_count);
+
+static PHP_FUNCTION(ob_tidyhandler);
+
+static PHP_FUNCTION(tidy_get_root);
+static PHP_FUNCTION(tidy_get_html);
+static PHP_FUNCTION(tidy_get_head);
+static PHP_FUNCTION(tidy_get_body);
+
+static TIDY_DOC_METHOD(__construct);
+static TIDY_DOC_METHOD(parseFile);
+static TIDY_DOC_METHOD(parseString);
+
+static 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/bz2 bz2.c php_bz2.h /ext/ctype ctype.c php_ctype.h /ext/pspell php_pspell.h pspell.c

2006-08-14 Thread Nuno Lopes
nlopess Mon Aug 14 14:53:23 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/bz2bz2.c php_bz2.h 
/php-src/ext/ctype  ctype.c php_ctype.h 
/php-src/ext/pspell php_pspell.h pspell.c 
  Log:
  a few more static keywording
  http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.14.2.3.2.5r2=1.14.2.3.2.6diff_format=u
Index: php-src/ext/bz2/bz2.c
diff -u php-src/ext/bz2/bz2.c:1.14.2.3.2.5 php-src/ext/bz2/bz2.c:1.14.2.3.2.6
--- php-src/ext/bz2/bz2.c:1.14.2.3.2.5  Mon Jun 26 21:13:46 2006
+++ php-src/ext/bz2/bz2.c   Mon Aug 14 14:53:23 2006
@@ -16,7 +16,7 @@
   +--+
 */
  
-/* $Id: bz2.c,v 1.14.2.3.2.5 2006/06/26 21:13:46 tony2001 Exp $ */
+/* $Id: bz2.c,v 1.14.2.3.2.6 2006/08/14 14:53:23 nlopess Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -83,7 +83,7 @@
 
 /* }}} */
 
-zend_function_entry bz2_functions[] = {
+static zend_function_entry bz2_functions[] = {
PHP_FE(bzopen,   arginfo_bzopen)
PHP_FE(bzread,   arginfo_bzread)
PHP_FALIAS(bzwrite,   fwrite,   NULL)
@@ -167,7 +167,7 @@
 }
 /* }}} */
 
-php_stream_ops php_stream_bz2io_ops = {
+static php_stream_ops php_stream_bz2io_ops = {
php_bz2iop_write, php_bz2iop_read,
php_bz2iop_close, php_bz2iop_flush,
BZip2,
@@ -272,7 +272,7 @@
NULL  /* rmdir */
 };
 
-php_stream_wrapper php_stream_bzip2_wrapper = {
+static php_stream_wrapper php_stream_bzip2_wrapper = {
bzip2_stream_wops,
NULL,
0 /* is_url */
@@ -280,14 +280,14 @@
 
 static void php_bz2_error(INTERNAL_FUNCTION_PARAMETERS, int);
 
-PHP_MINIT_FUNCTION(bz2)
+static PHP_MINIT_FUNCTION(bz2)
 {
php_register_url_stream_wrapper(compress.bzip2, 
php_stream_bzip2_wrapper TSRMLS_CC);
php_stream_filter_register_factory(bzip2.*, php_bz2_filter_factory 
TSRMLS_CC);
return SUCCESS;
 }
 
-PHP_MSHUTDOWN_FUNCTION(bz2)
+static PHP_MSHUTDOWN_FUNCTION(bz2)
 {
php_unregister_url_stream_wrapper(compress.bzip2 TSRMLS_CC);
php_stream_filter_unregister_factory(bzip2.* TSRMLS_CC);
@@ -295,7 +295,7 @@
return SUCCESS;
 }
 
-PHP_MINFO_FUNCTION(bz2)
+static PHP_MINFO_FUNCTION(bz2)
 {
php_info_print_table_start();
php_info_print_table_row(2, BZip2 Support, Enabled);
@@ -307,7 +307,7 @@
 
 /* {{{ proto string bzread(resource bz[, int length])
Reads up to length bytes from a BZip2 stream, or 1024 bytes if length is 
not specified */
-PHP_FUNCTION(bzread)
+static PHP_FUNCTION(bzread)
 {
zval *bz;
long len = 1024;
@@ -347,7 +347,7 @@
 
 /* {{{ proto resource bzopen(string|int file|fp, string mode)
Opens a new BZip2 stream */
-PHP_FUNCTION(bzopen)
+static PHP_FUNCTION(bzopen)
 {
zval**file,   /* The file to open */
**mode;   /* The mode to open the stream with */
@@ -435,7 +435,7 @@
 
 /* {{{ proto int bzerrno(resource bz)
Returns the error number */
-PHP_FUNCTION(bzerrno)
+static PHP_FUNCTION(bzerrno)
 {
php_bz2_error(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_BZ_ERRNO);
 }
@@ -443,7 +443,7 @@
 
 /* {{{ proto string bzerrstr(resource bz)
Returns the error string */
-PHP_FUNCTION(bzerrstr)
+static PHP_FUNCTION(bzerrstr)
 {
php_bz2_error(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_BZ_ERRSTR);
 }
@@ -451,7 +451,7 @@
 
 /* {{{ proto array bzerror(resource bz)
Returns the error number and error string in an associative array */
-PHP_FUNCTION(bzerror)
+static PHP_FUNCTION(bzerror)
 {
php_bz2_error(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_BZ_ERRBOTH);
 }
@@ -459,7 +459,7 @@
 
 /* {{{ proto string bzcompress(string source [, int blocksize100k [, int 
workfactor]])
Compresses a string into BZip2 encoded data */
-PHP_FUNCTION(bzcompress)
+static PHP_FUNCTION(bzcompress)
 {
zval**source,  /* Source data to compress */
**zblock_size, /* Optional block size to use */
@@ -517,7 +517,7 @@
 
 /* {{{ proto string bzdecompress(string source [, int small])
Decompresses BZip2 compressed data */
-PHP_FUNCTION(bzdecompress)
+static PHP_FUNCTION(bzdecompress)
 {
char *source, *dest;
int source_len, error;
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/php_bz2.h?r1=1.7.2.1r2=1.7.2.1.2.1diff_format=u
Index: php-src/ext/bz2/php_bz2.h
diff -u php-src/ext/bz2/php_bz2.h:1.7.2.1 php-src/ext/bz2/php_bz2.h:1.7.2.1.2.1
--- php-src/ext/bz2/php_bz2.h:1.7.2.1   Sun Jan  1 12:50:00 2006
+++ php-src/ext/bz2/php_bz2.h   Mon Aug 14 14:53:23 2006
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_bz2.h,v 1.7.2.1 2006/01/01 12:50:00 sniper Exp $ */
+/* $Id: php_bz2.h,v 1.7.2.1.2.1 2006/08/14 14:53:23 nlopess Exp $ */
 
 #ifndef PHP_BZ2_H
 #define PHP_BZ2_H
@@ -29,16 +29,16 @@
 /* Bzip2 includes */
 #include bzlib.h
 
-PHP_MINIT_FUNCTION(bz2);
-PHP_MSHUTDOWN_FUNCTION(bz2);

[PHP-CVS] cvs: php-src /ext/bz2 bz2.c php_bz2.h /ext/ctype ctype.c php_ctype.h /ext/pspell php_pspell.h pspell.c

2006-08-14 Thread Nuno Lopes
nlopess Mon Aug 14 14:54:19 2006 UTC

  Modified files:  
/php-src/ext/bz2bz2.c php_bz2.h 
/php-src/ext/ctype  ctype.c php_ctype.h 
/php-src/ext/pspell php_pspell.h pspell.c 
  Log:
  MFB: a few more static keywording
  http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.24r2=1.25diff_format=u
Index: php-src/ext/bz2/bz2.c
diff -u php-src/ext/bz2/bz2.c:1.24 php-src/ext/bz2/bz2.c:1.25
--- php-src/ext/bz2/bz2.c:1.24  Mon Jun 26 21:13:22 2006
+++ php-src/ext/bz2/bz2.c   Mon Aug 14 14:54:19 2006
@@ -16,7 +16,7 @@
   +--+
 */
  
-/* $Id: bz2.c,v 1.24 2006/06/26 21:13:22 tony2001 Exp $ */
+/* $Id: bz2.c,v 1.25 2006/08/14 14:54:19 nlopess Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -83,7 +83,7 @@
 
 /* }}} */
 
-zend_function_entry bz2_functions[] = {
+static zend_function_entry bz2_functions[] = {
PHP_FE(bzopen,   arginfo_bzopen)
PHP_FE(bzread,   arginfo_bzread)
PHP_FALIAS(bzwrite,   fwrite,   NULL)
@@ -167,7 +167,7 @@
 }
 /* }}} */
 
-php_stream_ops php_stream_bz2io_ops = {
+static php_stream_ops php_stream_bz2io_ops = {
php_bz2iop_write, php_bz2iop_read,
php_bz2iop_close, php_bz2iop_flush,
BZip2,
@@ -272,7 +272,7 @@
NULL  /* rmdir */
 };
 
-php_stream_wrapper php_stream_bzip2_wrapper = {
+static php_stream_wrapper php_stream_bzip2_wrapper = {
bzip2_stream_wops,
NULL,
0 /* is_url */
@@ -280,14 +280,14 @@
 
 static void php_bz2_error(INTERNAL_FUNCTION_PARAMETERS, int);
 
-PHP_MINIT_FUNCTION(bz2)
+static PHP_MINIT_FUNCTION(bz2)
 {
php_register_url_stream_wrapper(compress.bzip2, 
php_stream_bzip2_wrapper TSRMLS_CC);
php_stream_filter_register_factory(bzip2.*, php_bz2_filter_factory 
TSRMLS_CC);
return SUCCESS;
 }
 
-PHP_MSHUTDOWN_FUNCTION(bz2)
+static PHP_MSHUTDOWN_FUNCTION(bz2)
 {
php_unregister_url_stream_wrapper(compress.bzip2 TSRMLS_CC);
php_stream_filter_unregister_factory(bzip2.* TSRMLS_CC);
@@ -295,7 +295,7 @@
return SUCCESS;
 }
 
-PHP_MINFO_FUNCTION(bz2)
+static PHP_MINFO_FUNCTION(bz2)
 {
php_info_print_table_start();
php_info_print_table_row(2, BZip2 Support, Enabled);
@@ -307,7 +307,7 @@
 
 /* {{{ proto string bzread(resource bz[, int length])
Reads up to length bytes from a BZip2 stream, or 1024 bytes if length is 
not specified */
-PHP_FUNCTION(bzread)
+static PHP_FUNCTION(bzread)
 {
zval *bz;
long len = 1024;
@@ -341,7 +341,7 @@
 
 /* {{{ proto resource bzopen(string|int file|fp, string mode)
Opens a new BZip2 stream */
-PHP_FUNCTION(bzopen)
+static PHP_FUNCTION(bzopen)
 {
zval**file,   /* The file to open */
**mode;   /* The mode to open the stream with */
@@ -429,7 +429,7 @@
 
 /* {{{ proto int bzerrno(resource bz)
Returns the error number */
-PHP_FUNCTION(bzerrno)
+static PHP_FUNCTION(bzerrno)
 {
php_bz2_error(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_BZ_ERRNO);
 }
@@ -437,7 +437,7 @@
 
 /* {{{ proto string bzerrstr(resource bz)
Returns the error string */
-PHP_FUNCTION(bzerrstr)
+static PHP_FUNCTION(bzerrstr)
 {
php_bz2_error(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_BZ_ERRSTR);
 }
@@ -445,7 +445,7 @@
 
 /* {{{ proto array bzerror(resource bz)
Returns the error number and error string in an associative array */
-PHP_FUNCTION(bzerror)
+static PHP_FUNCTION(bzerror)
 {
php_bz2_error(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_BZ_ERRBOTH);
 }
@@ -453,7 +453,7 @@
 
 /* {{{ proto string bzcompress(string source [, int blocksize100k [, int 
workfactor]])
Compresses a string into BZip2 encoded data */
-PHP_FUNCTION(bzcompress)
+static PHP_FUNCTION(bzcompress)
 {
zval**source,  /* Source data to compress */
**zblock_size, /* Optional block size to use */
@@ -511,7 +511,7 @@
 
 /* {{{ proto string bzdecompress(string source [, int small])
Decompresses BZip2 compressed data */
-PHP_FUNCTION(bzdecompress)
+static PHP_FUNCTION(bzdecompress)
 {
char *source, *dest;
int source_len, error;
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/php_bz2.h?r1=1.8r2=1.9diff_format=u
Index: php-src/ext/bz2/php_bz2.h
diff -u php-src/ext/bz2/php_bz2.h:1.8 php-src/ext/bz2/php_bz2.h:1.9
--- php-src/ext/bz2/php_bz2.h:1.8   Sun Jan  1 13:09:48 2006
+++ php-src/ext/bz2/php_bz2.h   Mon Aug 14 14:54:19 2006
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_bz2.h,v 1.8 2006/01/01 13:09:48 sniper Exp $ */
+/* $Id: php_bz2.h,v 1.9 2006/08/14 14:54:19 nlopess Exp $ */
 
 #ifndef PHP_BZ2_H
 #define PHP_BZ2_H
@@ -29,16 +29,16 @@
 /* Bzip2 includes */
 #include bzlib.h
 
-PHP_MINIT_FUNCTION(bz2);
-PHP_MSHUTDOWN_FUNCTION(bz2);
-PHP_MINFO_FUNCTION(bz2);
-PHP_FUNCTION(bzopen);
-PHP_FUNCTION(bzread);
-PHP_FUNCTION(bzerrno);
-PHP_FUNCTION(bzerrstr);

[PHP-CVS] cvs: php-src /ext/tidy README libtidy.txt php_tidy.h tidy.c

2006-08-14 Thread Nuno Lopes
nlopess Mon Aug 14 15:17:03 2006 UTC

  Removed files:   
/php-src/ext/tidy   libtidy.txt 

  Modified files:  
/php-src/ext/tidy   README php_tidy.h tidy.c 
  Log:
  MFB: static keywording
  http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/README?r1=1.4r2=1.5diff_format=u
Index: php-src/ext/tidy/README
diff -u php-src/ext/tidy/README:1.4 php-src/ext/tidy/README:1.5
--- php-src/ext/tidy/README:1.4 Mon Jan 12 10:02:04 2004
+++ php-src/ext/tidy/README Mon Aug 14 15:17:03 2006
@@ -5,12 +5,3 @@
 Tidy is an extension based on Libtidy (http://tidy.sf.net/) and allows a PHP 
developer
 to clean, repair, and traverse HTML, XHTML, and XML documents -- including 
ones with
 embedded scripting languages such as PHP or ASP within them using OO 
constructs.
-

-!! Important Note !!

-Older versions of libtidy have a small memory leak inside the 
ParseConfigFileEnc() function
-used to load configuration from a file. If you intend to use this 
functionality apply
-the libtidy.txt patch (cd tidy/src/; patch -p0  libtidy.txt) to libtidy 
sources and
-then recompile libtidy.

http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/php_tidy.h?r1=1.29r2=1.30diff_format=u
Index: php-src/ext/tidy/php_tidy.h
diff -u php-src/ext/tidy/php_tidy.h:1.29 php-src/ext/tidy/php_tidy.h:1.30
--- php-src/ext/tidy/php_tidy.h:1.29Wed May 24 21:22:27 2006
+++ php-src/ext/tidy/php_tidy.h Mon Aug 14 15:17:03 2006
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_tidy.h,v 1.29 2006/05/24 21:22:27 tony2001 Exp $ */
+/* $Id: php_tidy.h,v 1.30 2006/08/14 15:17:03 nlopess Exp $ */
 
 #ifndef PHP_TIDY_H
 #define PHP_TIDY_H
@@ -39,58 +39,58 @@
 #define TIDY_ATTR_METHOD(name)PHP_FUNCTION(tam_ ##name)
 #define TIDY_ATTR_ME(name, param) TIDY_METHOD_MAP(name, tam_ ##name, param)
 
-PHP_MINIT_FUNCTION(tidy);
-PHP_MSHUTDOWN_FUNCTION(tidy);
-PHP_RINIT_FUNCTION(tidy);
-PHP_MINFO_FUNCTION(tidy);
-
-PHP_FUNCTION(tidy_getopt);
-PHP_FUNCTION(tidy_parse_string);
-PHP_FUNCTION(tidy_parse_file);
-PHP_FUNCTION(tidy_clean_repair);
-PHP_FUNCTION(tidy_repair_string);
-PHP_FUNCTION(tidy_repair_file);
-PHP_FUNCTION(tidy_diagnose);
-PHP_FUNCTION(tidy_get_output);
-PHP_FUNCTION(tidy_get_error_buffer);
-PHP_FUNCTION(tidy_get_release);
-PHP_FUNCTION(tidy_reset_config);
-PHP_FUNCTION(tidy_get_config);
-PHP_FUNCTION(tidy_get_status);
-PHP_FUNCTION(tidy_get_html_ver);
+static PHP_MINIT_FUNCTION(tidy);
+static PHP_MSHUTDOWN_FUNCTION(tidy);
+static PHP_RINIT_FUNCTION(tidy);
+static PHP_MINFO_FUNCTION(tidy);
+
+static PHP_FUNCTION(tidy_getopt);
+static PHP_FUNCTION(tidy_parse_string);
+static PHP_FUNCTION(tidy_parse_file);
+static PHP_FUNCTION(tidy_clean_repair);
+static PHP_FUNCTION(tidy_repair_string);
+static PHP_FUNCTION(tidy_repair_file);
+static PHP_FUNCTION(tidy_diagnose);
+static PHP_FUNCTION(tidy_get_output);
+static PHP_FUNCTION(tidy_get_error_buffer);
+static PHP_FUNCTION(tidy_get_release);
+static PHP_FUNCTION(tidy_reset_config);
+static PHP_FUNCTION(tidy_get_config);
+static PHP_FUNCTION(tidy_get_status);
+static PHP_FUNCTION(tidy_get_html_ver);
 #if HAVE_TIDYOPTGETDOC
-PHP_FUNCTION(tidy_get_opt_doc);
+static PHP_FUNCTION(tidy_get_opt_doc);
 #endif
-PHP_FUNCTION(tidy_is_xhtml);
-PHP_FUNCTION(tidy_is_xml);
-PHP_FUNCTION(tidy_error_count);
-PHP_FUNCTION(tidy_warning_count);
-PHP_FUNCTION(tidy_access_count);
-PHP_FUNCTION(tidy_config_count);
-
-PHP_FUNCTION(ob_tidyhandler);
-
-PHP_FUNCTION(tidy_get_root);
-PHP_FUNCTION(tidy_get_html);
-PHP_FUNCTION(tidy_get_head);
-PHP_FUNCTION(tidy_get_body);
-
-TIDY_DOC_METHOD(__construct);
-TIDY_DOC_METHOD(parseFile);
-TIDY_DOC_METHOD(parseString);
-
-TIDY_NODE_METHOD(__construct);
-TIDY_NODE_METHOD(hasChildren);
-TIDY_NODE_METHOD(hasSiblings);
-TIDY_NODE_METHOD(isComment);
-TIDY_NODE_METHOD(isHtml);
-TIDY_NODE_METHOD(isXhtml);
-TIDY_NODE_METHOD(isXml);
-TIDY_NODE_METHOD(isText);
-TIDY_NODE_METHOD(isJste);
-TIDY_NODE_METHOD(isAsp);
-TIDY_NODE_METHOD(isPhp);
-TIDY_NODE_METHOD(getParent);
+static PHP_FUNCTION(tidy_is_xhtml);
+static PHP_FUNCTION(tidy_is_xml);
+static PHP_FUNCTION(tidy_error_count);
+static PHP_FUNCTION(tidy_warning_count);
+static PHP_FUNCTION(tidy_access_count);
+static PHP_FUNCTION(tidy_config_count);
+
+static PHP_FUNCTION(ob_tidyhandler);
+
+static PHP_FUNCTION(tidy_get_root);
+static PHP_FUNCTION(tidy_get_html);
+static PHP_FUNCTION(tidy_get_head);
+static PHP_FUNCTION(tidy_get_body);
+
+static TIDY_DOC_METHOD(__construct);
+static TIDY_DOC_METHOD(parseFile);
+static TIDY_DOC_METHOD(parseString);
+
+static TIDY_NODE_METHOD(__construct);
+static TIDY_NODE_METHOD(hasChildren);
+static TIDY_NODE_METHOD(hasSiblings);
+static TIDY_NODE_METHOD(isComment);

[PHP-CVS] cvs: php-src /main/streams userspace.c

2006-08-14 Thread Antony Dovgal
tony2001Mon Aug 14 15:00:05 2006 UTC

  Modified files:  
/php-src/main/streams   userspace.c 
  Log:
  fix #38450 (constructor is not called for classes used in userspace stream 
wrappers)
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/streams/userspace.c?r1=1.34r2=1.35diff_format=u
Index: php-src/main/streams/userspace.c
diff -u php-src/main/streams/userspace.c:1.34 
php-src/main/streams/userspace.c:1.35
--- php-src/main/streams/userspace.c:1.34   Sat Apr 22 23:49:39 2006
+++ php-src/main/streams/userspace.cMon Aug 14 15:00:04 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: userspace.c,v 1.34 2006/04/22 23:49:39 tony2001 Exp $ */
+/* $Id: userspace.c,v 1.35 2006/08/14 15:00:04 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -231,6 +231,40 @@
object_init_ex(us-object, uwrap-ce);
ZVAL_REFCOUNT(us-object) = 1;
PZVAL_IS_REF(us-object) = 1;
+   
+   if (uwrap-ce-constructor) {
+   zend_fcall_info fci;
+   zend_fcall_info_cache fcc;
+   zval *retval_ptr;
+   
+   fci.size = sizeof(fci);
+   fci.function_table = uwrap-ce-function_table;
+   fci.function_name = NULL;
+   fci.symbol_table = NULL;
+   fci.object_pp = us-object;
+   fci.retval_ptr_ptr = retval_ptr;
+   fci.param_count = 0;
+   fci.params = NULL;
+   fci.no_separation = 1;
+   
+   fcc.initialized = 1;
+   fcc.function_handler = uwrap-ce-constructor;
+   fcc.calling_scope = EG(scope);
+   fcc.object_pp = us-object;
+
+   if (zend_call_function(fci, fcc TSRMLS_CC) == FAILURE) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
execute %s::%s(), uwrap-ce-name, 
uwrap-ce-constructor-common.function_name);
+   zval_dtor(us-object);
+   FREE_ZVAL(us-object);
+   efree(us);
+   FG(user_stream_current_filename) = NULL;
+   return NULL;
+   } else {
+   if (retval_ptr) {
+   zval_ptr_dtor(retval_ptr);
+   }
+   }
+   }
 
if (context) {
MAKE_STD_ZVAL(zcontext);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /main/streams userspace.c

2006-08-14 Thread Antony Dovgal
tony2001Mon Aug 14 15:01:29 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/main/streams   userspace.c 
  Log:
  MFH: fix #38450 (constructor is not called for classes used in userspace 
stream wrappers)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.199r2=1.2027.2.547.2.200diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.199 php-src/NEWS:1.2027.2.547.2.200
--- php-src/NEWS:1.2027.2.547.2.199 Mon Aug 14 11:59:24 2006
+++ php-src/NEWSMon Aug 14 15:01:29 2006
@@ -37,6 +37,8 @@
 - Fixed phpinfo() cutoff of variables at \0. (Ilia)
 - Fixed a bug in the filter extension that prevented magic_quotes_gpc from
   being applied when RAW filter is used. (Ilia)
+- Fixed bug #38450 (constructor is not called for classes used in userspace 
+  stream wrappers). (Tony)
 - Fixed bug #38438 (DOMNodeList-item(0) segfault on empty NodeList). (Ilia)
 - Fixed bug #38431 (xmlrpc_get_type() crashes PHP on objects). (Tony)
 - Fixed bug #38424 (Different attribute assignment if new or existing). (Rob)
http://cvs.php.net/viewvc.cgi/php-src/main/streams/userspace.c?r1=1.31.2.3r2=1.31.2.3.2.1diff_format=u
Index: php-src/main/streams/userspace.c
diff -u php-src/main/streams/userspace.c:1.31.2.3 
php-src/main/streams/userspace.c:1.31.2.3.2.1
--- php-src/main/streams/userspace.c:1.31.2.3   Sat Apr 22 17:17:40 2006
+++ php-src/main/streams/userspace.cMon Aug 14 15:01:29 2006
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: userspace.c,v 1.31.2.3 2006/04/22 17:17:40 wez Exp $ */
+/* $Id: userspace.c,v 1.31.2.3.2.1 2006/08/14 15:01:29 tony2001 Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -231,6 +231,40 @@
object_init_ex(us-object, uwrap-ce);
ZVAL_REFCOUNT(us-object) = 1;
PZVAL_IS_REF(us-object) = 1;
+   
+   if (uwrap-ce-constructor) {
+   zend_fcall_info fci;
+   zend_fcall_info_cache fcc;
+   zval *retval_ptr;
+   
+   fci.size = sizeof(fci);
+   fci.function_table = uwrap-ce-function_table;
+   fci.function_name = NULL;
+   fci.symbol_table = NULL;
+   fci.object_pp = us-object;
+   fci.retval_ptr_ptr = retval_ptr;
+   fci.param_count = 0;
+   fci.params = NULL;
+   fci.no_separation = 1;
+   
+   fcc.initialized = 1;
+   fcc.function_handler = uwrap-ce-constructor;
+   fcc.calling_scope = EG(scope);
+   fcc.object_pp = us-object;
+
+   if (zend_call_function(fci, fcc TSRMLS_CC) == FAILURE) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not 
execute %s::%s(), uwrap-ce-name, 
uwrap-ce-constructor-common.function_name);
+   zval_dtor(us-object);
+   FREE_ZVAL(us-object);
+   efree(us);
+   FG(user_stream_current_filename) = NULL;
+   return NULL;
+   } else {
+   if (retval_ptr) {
+   zval_ptr_dtor(retval_ptr);
+   }
+   }
+   }
 
if (context) {
MAKE_STD_ZVAL(zcontext);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/zip php_zip.c

2006-08-14 Thread Pierre-Alain Joye
pajoye  Mon Aug 14 15:07:52 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/zipphp_zip.c 
  Log:
  - nuke unused parameter (not present in old versions)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.4r2=1.1.2.5diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.1.2.4 php-src/ext/zip/php_zip.c:1.1.2.5
--- php-src/ext/zip/php_zip.c:1.1.2.4   Sun Aug 13 23:43:11 2006
+++ php-src/ext/zip/php_zip.c   Mon Aug 14 15:07:52 2006
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_zip.c,v 1.1.2.4 2006/08/13 23:43:11 pajoye Exp $ */
+/* $Id: php_zip.c,v 1.1.2.5 2006/08/14 15:07:52 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -657,17 +657,16 @@
 }
 /* }}} */
 
-/* {{{ proto resource zip_read(resource zip [, int flags])
+/* {{{ proto resource zip_read(resource zip)
Returns the next file in the archive */
 PHP_FUNCTION(zip_read)
 {
zval *zip_dp;
zip_read_rsrc *zr_rsrc;
int ret;
-   long flags = 0;
zip_rsrc *rsrc_int;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|l, zip_dp, 
flags) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, zip_dp) == 
FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(rsrc_int, zip_rsrc *, zip_dp, -1, le_zip_dir_name, 
le_zip_dir);
@@ -679,7 +678,7 @@
 
zr_rsrc = emalloc(sizeof(zip_read_rsrc));
 
-   ret = zip_stat_index(rsrc_int-za, rsrc_int-index_current, 
flags, zr_rsrc-sb);
+   ret = zip_stat_index(rsrc_int-za, rsrc_int-index_current, 0, 
zr_rsrc-sb);
 
if (ret != 0) {
efree(zr_rsrc);
@@ -745,17 +744,17 @@
 }
 /* }}} */
 
-/* {{{ proto mixed zip_entry_read(resource zip_entry [, int len [, int mode]])
+/* {{{ proto mixed zip_entry_read(resource zip_entry [, int len])
Read from an open directory entry */
 PHP_FUNCTION(zip_entry_read)
 {
zval * zip_entry;
-   long len = 0, mode = 0;
+   long len = 0;
zip_read_rsrc * zr_rsrc;
char *buffer;
int n = 0;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|ll, 
zip_entry, len, mode) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|l, zip_entry, 
len) == FAILURE) {
return;
}
 
@@ -1973,7 +1972,7 @@
php_info_print_table_start();
 
php_info_print_table_row(2, Zip, enabled);
-   php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 
1.1.2.4 2006/08/13 23:43:11 pajoye Exp $);
+   php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 
1.1.2.5 2006/08/14 15:07:52 pajoye Exp $);
php_info_print_table_row(2, Zip version, 1.4.0);
php_info_print_table_row(2, Libzip version, 0.7.1);
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo_sqlite package2.xml

2006-08-14 Thread Ilia Alshanetsky
iliaa   Mon Aug 14 16:34:24 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdo_sqlite package2.xml 
  Log:
  Added missing file entry
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_sqlite/package2.xml?r1=1.1.2.3.2.1r2=1.1.2.3.2.2diff_format=u
Index: php-src/ext/pdo_sqlite/package2.xml
diff -u php-src/ext/pdo_sqlite/package2.xml:1.1.2.3.2.1 
php-src/ext/pdo_sqlite/package2.xml:1.1.2.3.2.2
--- php-src/ext/pdo_sqlite/package2.xml:1.1.2.3.2.1 Mon Aug 14 16:15:28 2006
+++ php-src/ext/pdo_sqlite/package2.xml Mon Aug 14 16:34:24 2006
@@ -114,6 +114,7 @@
  file name=vtab.c role=src /
  file name=loadext.c role=src /
  file name=complete.c role=src /
+ file name=sqlite3ext.h role=src /
 /dir !-- //sqlite/src --
 dir name=tool
  file name=diffdb.c role=src /

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] Re: cvs: php-src /ext/tidy README libtidy.txt php_tidy.h tidy.c

2006-08-14 Thread Michael Wallner
Nuno Lopes wrote:
 nlopess   Mon Aug 14 15:17:03 2006 UTC
 
   Removed files:   
 /php-src/ext/tidy libtidy.txt 
 
   Modified files:  
 /php-src/ext/tidy README php_tidy.h tidy.c 
   Log:
   MFB: static keywording

Hi Nuno,

can you please put static function declarations into the source file 
(where the functions are defined in) and remove them from the header file.

Thanks,
-- 
Michael

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2006-08-14 Thread Ilia Alshanetsky
iliaa   Mon Aug 14 16:16:43 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  Updated libsqlite in ext/pdo_sqlite to 3.3.7.
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.200r2=1.2027.2.547.2.201diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.200 php-src/NEWS:1.2027.2.547.2.201
--- php-src/NEWS:1.2027.2.547.2.200 Mon Aug 14 15:01:29 2006
+++ php-src/NEWSMon Aug 14 16:16:42 2006
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? Aug 2006, PHP 5.2.0RC2
+- Updated libsqlite in ext/pdo_sqlite to 3.3.7. (Ilia)
 - Added support for httpOnly flag for session extension and cookie setting
   functions. (Scott MacVicar, Ilia)
 - Added version specific registry keys to allow different configurations for

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/zip php_zip.c

2006-08-14 Thread Pierre-Alain Joye
pajoye  Mon Aug 14 15:39:29 2006 UTC

  Modified files:  
/php-src/ext/zipphp_zip.c 
  Log:
  - MFB: nuke unused parameter (not present in old versions)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.5r2=1.6diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.5 php-src/ext/zip/php_zip.c:1.6
--- php-src/ext/zip/php_zip.c:1.5   Sun Aug 13 23:39:57 2006
+++ php-src/ext/zip/php_zip.c   Mon Aug 14 15:39:28 2006
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_zip.c,v 1.5 2006/08/13 23:39:57 pajoye Exp $ */
+/* $Id: php_zip.c,v 1.6 2006/08/14 15:39:28 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -588,23 +588,22 @@
 ZEND_GET_MODULE(zip)
 #endif
 
-/* {{{ proto resource zip_open(string filename [,flags])
+/* {{{ proto resource zip_open(string filename)
 Create new zip using source uri for output */
 PHP_FUNCTION(zip_open)
 {
char *filename;
int   filename_len;
zip_rsrc *rsrc_int;
-   long mode = 0;
int err = 0;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|l, filename, 
filename_len, mode) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|l, filename, 
filename_len) == FAILURE) {
return;
}
 
rsrc_int = (zip_rsrc *)emalloc(sizeof(zip_rsrc));
 
-   rsrc_int-za = zip_open(filename, mode, err);
+   rsrc_int-za = zip_open(filename, 0, err);
if (rsrc_int-za == NULL) {
efree(rsrc_int);
RETURN_LONG((long)err);
@@ -727,12 +726,12 @@
 PHP_FUNCTION(zip_entry_read)
 {
zval * zip_entry;
-   long len = 0, mode = 0;
+   long len = 0;
zip_read_rsrc * zr_rsrc;
char *buffer;
int n = 0;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|ll, 
zip_entry, len, mode) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r|l, zip_entry, 
len) == FAILURE) {
return;
}
 
@@ -1946,7 +1945,7 @@
php_info_print_table_start();
 
php_info_print_table_row(2, Zip, enabled);
-   php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 1.5 
2006/08/13 23:39:57 pajoye Exp $);
+   php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 1.6 
2006/08/14 15:39:28 pajoye Exp $);
php_info_print_table_row(2, Zip version, 1.4.0);
php_info_print_table_row(2, Libzip version, 0.7.1);
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: CVSROOT / avail

2006-08-14 Thread Pierre-Alain Joye
pajoye  Mon Aug 14 18:13:26 2006 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Matthias Nothhaft account
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1164r2=1.1165diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1164 CVSROOT/avail:1.1165
--- CVSROOT/avail:1.1164Wed Aug  2 18:00:27 2006
+++ CVSROOT/avail   Mon Aug 14 18:13:25 2006
@@ -344,6 +344,7 @@
 avail|thorstenr|pear/NTLMProxy,peardoc
 avail|rumata|pear/HTTP_Sync,peardoc
 avail|ahayes|pear/Validate,peardoc
+avail|mahono|pear/LiveUser,pear/LiveUser_Admin
 
 # Curl modules
 
avail|bagder,sterling,crisb,linus_nielsen|curl,curl-cpp,curl-java,curl-perl,curl-php,curl-www

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src / php.ini-dist php.ini-recommended /ext/fbsql php_fbsql.c php_fbsql.h

2006-08-14 Thread Frank M. Kromann
fmk Mon Aug 14 18:39:30 2006 UTC

  Modified files:  
/php-srcphp.ini-dist php.ini-recommended 
/php-src/ext/fbsql  php_fbsql.c php_fbsql.h 
  Log:
  Cleanup before reusing failed persistant connection. Better formating of 
timestamp and decimal values
  
http://cvs.php.net/viewvc.cgi/php-src/php.ini-dist?r1=1.251r2=1.252diff_format=u
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.251 php-src/php.ini-dist:1.252
--- php-src/php.ini-dist:1.251  Thu Aug 10 13:56:54 2006
+++ php-src/php.ini-distMon Aug 14 18:39:30 2006
@@ -1072,6 +1072,7 @@
 [FrontBase]
 ;fbsql.allow_persistent = On
 ;fbsql.autocommit = On
+;fbsql.show_timestamp_decimals = Off
 ;fbsql.default_database =
 ;fbsql.default_database_password =
 ;fbsql.default_host =
http://cvs.php.net/viewvc.cgi/php-src/php.ini-recommended?r1=1.200r2=1.201diff_format=u
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.200 php-src/php.ini-recommended:1.201
--- php-src/php.ini-recommended:1.200   Thu Aug 10 13:56:54 2006
+++ php-src/php.ini-recommended Mon Aug 14 18:39:30 2006
@@ -1103,6 +1103,7 @@
 [FrontBase]
 ;fbsql.allow_persistent = On
 ;fbsql.autocommit = On
+;fbsql.show_timestamp_decimals = Off
 ;fbsql.default_database =
 ;fbsql.default_database_password =
 ;fbsql.default_host =
http://cvs.php.net/viewvc.cgi/php-src/ext/fbsql/php_fbsql.c?r1=1.119r2=1.120diff_format=u
Index: php-src/ext/fbsql/php_fbsql.c
diff -u php-src/ext/fbsql/php_fbsql.c:1.119 php-src/ext/fbsql/php_fbsql.c:1.120
--- php-src/ext/fbsql/php_fbsql.c:1.119 Wed Jun 14 21:29:22 2006
+++ php-src/ext/fbsql/php_fbsql.c   Mon Aug 14 18:39:30 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.119 2006/06/14 21:29:22 bjori Exp $ */
+/* $Id: php_fbsql.c,v 1.120 2006/08/14 18:39:30 fmk Exp $ */
 
 /* TODO:
  *
@@ -58,6 +58,10 @@
 
 #define HAVE_FBSQL 1
 
+#ifndef min
+# define min(a,b) ((a)(b)?(a):(b))
+#endif
+
 #if HAVE_FBSQL
 #include php_fbsql.h
 #include signal.h
@@ -737,6 +741,7 @@
STD_PHP_INI_BOOLEAN  (fbsql.allow_persistent, 
1,PHP_INI_SYSTEM, OnUpdateBool,   allowPersistent,  
zend_fbsql_globals, fbsql_globals)
STD_PHP_INI_BOOLEAN  (fbsql.generate_warnings,
0,PHP_INI_SYSTEM, OnUpdateBool,   generateWarnings, 
zend_fbsql_globals, fbsql_globals)
STD_PHP_INI_BOOLEAN  (fbsql.autocommit,   
1,PHP_INI_SYSTEM, OnUpdateBool,   autoCommit,   
zend_fbsql_globals, fbsql_globals)
+   STD_PHP_INI_BOOLEAN  (fbsql.show_timestamp_decimals,  0,
PHP_INI_SYSTEM, OnUpdateBool,   showTimestampDecimals,  
zend_fbsql_globals, fbsql_globals)
STD_PHP_INI_ENTRY_EX (fbsql.max_persistent,   
-1,   PHP_INI_SYSTEM, OnUpdateLong,   maxPersistent,
zend_fbsql_globals, fbsql_globals, display_link_numbers)
STD_PHP_INI_ENTRY_EX (fbsql.max_links,
128,  PHP_INI_SYSTEM, OnUpdateLong,   maxLinks, 
zend_fbsql_globals, fbsql_globals, display_link_numbers)
STD_PHP_INI_ENTRY_EX (fbsql.max_connections,  
128,  PHP_INI_SYSTEM, OnUpdateLong,   maxConnections,   
zend_fbsql_globals, fbsql_globals, display_link_numbers)
@@ -896,7 +901,26 @@
if (persistent) {
if (zend_hash_find(EG(persistent_list), name, strlen(name) + 
1, (void **)lep) == SUCCESS)
{
+   FBCMetaData *md;
phpLink = (PHPFBLink*)lep-ptr;
+   // Check if connection still there.
+   md = fbcdcRollback(phpLink-connection);
+   if ( !mdOk(phpLink, md, Rollback;) ) {
+   if (FB_SQL_G(generateWarnings)) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING, FrontBase link is not connected, ty to reconnect.);
+   }
+   // Make sure select_db will reconnect.
+   fbcmdRelease(md);
+   fbcdcClose(phpLink-connection);
+   fbcdcRelease(phpLink-connection);
+   free(phpLink-connection);
+   phpLink-connection = NULL;
+   if (phpLink-databaseName) 
free(phpLink-databaseName);
+   phpLink-databaseName = NULL;
+   }
+   else {
+   fbcmdRelease(md);
+   }
}
else {
zend_rsrc_list_entry le;
@@ -2866,8 +2890,6 @@
case FB_Float:
case FB_Real:
case FB_Double:
-   case 

[PHP-CVS] cvs: php-src(PHP_5_2) / php.ini-dist php.ini-recommended /ext/fbsql php_fbsql.c php_fbsql.h

2006-08-14 Thread Frank M. Kromann
fmk Mon Aug 14 18:40:08 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcphp.ini-dist php.ini-recommended 
/php-src/ext/fbsql  php_fbsql.c php_fbsql.h 
  Log:
  MFH: Cleanup before reusing failed persistant connection. Better formating of 
timestamp and decimal values
  
http://cvs.php.net/viewvc.cgi/php-src/php.ini-dist?r1=1.231.2.10.2.4r2=1.231.2.10.2.5diff_format=u
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.231.2.10.2.4 php-src/php.ini-dist:1.231.2.10.2.5
--- php-src/php.ini-dist:1.231.2.10.2.4 Thu Aug 10 13:50:55 2006
+++ php-src/php.ini-distMon Aug 14 18:40:08 2006
@@ -1154,6 +1154,7 @@
 [FrontBase]
 ;fbsql.allow_persistent = On
 ;fbsql.autocommit = On
+;fbsql.show_timestamp_decimals = Off
 ;fbsql.default_database =
 ;fbsql.default_database_password =
 ;fbsql.default_host =
http://cvs.php.net/viewvc.cgi/php-src/php.ini-recommended?r1=1.179.2.11.2.3r2=1.179.2.11.2.4diff_format=u
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.179.2.11.2.3 
php-src/php.ini-recommended:1.179.2.11.2.4
--- php-src/php.ini-recommended:1.179.2.11.2.3  Thu Aug 10 13:50:55 2006
+++ php-src/php.ini-recommended Mon Aug 14 18:40:08 2006
@@ -1209,6 +1209,7 @@
 [FrontBase]
 ;fbsql.allow_persistent = On
 ;fbsql.autocommit = On
+;fbsql.show_timestamp_decimals = Off
 ;fbsql.default_database =
 ;fbsql.default_database_password =
 ;fbsql.default_host =
http://cvs.php.net/viewvc.cgi/php-src/ext/fbsql/php_fbsql.c?r1=1.114.2.3.2.2r2=1.114.2.3.2.3diff_format=u
Index: php-src/ext/fbsql/php_fbsql.c
diff -u php-src/ext/fbsql/php_fbsql.c:1.114.2.3.2.2 
php-src/ext/fbsql/php_fbsql.c:1.114.2.3.2.3
--- php-src/ext/fbsql/php_fbsql.c:1.114.2.3.2.2 Thu Jun 15 18:33:07 2006
+++ php-src/ext/fbsql/php_fbsql.c   Mon Aug 14 18:40:08 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.114.2.3.2.2 2006/06/15 18:33:07 dmitry Exp $ */
+/* $Id: php_fbsql.c,v 1.114.2.3.2.3 2006/08/14 18:40:08 fmk Exp $ */
 
 /* TODO:
  *
@@ -58,6 +58,10 @@
 
 #define HAVE_FBSQL 1
 
+#ifndef min
+# define min(a,b) ((a)(b)?(a):(b))
+#endif
+
 #if HAVE_FBSQL
 #include php_fbsql.h
 #include signal.h
@@ -737,6 +741,7 @@
STD_PHP_INI_BOOLEAN  (fbsql.allow_persistent, 
1,PHP_INI_SYSTEM, OnUpdateBool,   allowPersistent,  
zend_fbsql_globals, fbsql_globals)
STD_PHP_INI_BOOLEAN  (fbsql.generate_warnings,
0,PHP_INI_SYSTEM, OnUpdateBool,   generateWarnings, 
zend_fbsql_globals, fbsql_globals)
STD_PHP_INI_BOOLEAN  (fbsql.autocommit,   
1,PHP_INI_SYSTEM, OnUpdateBool,   autoCommit,   
zend_fbsql_globals, fbsql_globals)
+   STD_PHP_INI_BOOLEAN  (fbsql.show_timestamp_decimals,  0,
PHP_INI_SYSTEM, OnUpdateBool,   showTimestampDecimals,  
zend_fbsql_globals, fbsql_globals)
STD_PHP_INI_ENTRY_EX (fbsql.max_persistent,   
-1,   PHP_INI_SYSTEM, OnUpdateLong,   maxPersistent,
zend_fbsql_globals, fbsql_globals, display_link_numbers)
STD_PHP_INI_ENTRY_EX (fbsql.max_links,
128,  PHP_INI_SYSTEM, OnUpdateLong,   maxLinks, 
zend_fbsql_globals, fbsql_globals, display_link_numbers)
STD_PHP_INI_ENTRY_EX (fbsql.max_connections,  
128,  PHP_INI_SYSTEM, OnUpdateLong,   maxConnections,   
zend_fbsql_globals, fbsql_globals, display_link_numbers)
@@ -896,7 +901,26 @@
if (persistent) {
if (zend_hash_find(EG(persistent_list), name, strlen(name) + 
1, (void **)lep) == SUCCESS)
{
+   FBCMetaData *md;
phpLink = (PHPFBLink*)lep-ptr;
+   // Check if connection still there.
+   md = fbcdcRollback(phpLink-connection);
+   if ( !mdOk(phpLink, md, Rollback;) ) {
+   if (FB_SQL_G(generateWarnings)) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING, FrontBase link is not connected, ty to reconnect.);
+   }
+   // Make sure select_db will reconnect.
+   fbcmdRelease(md);
+   fbcdcClose(phpLink-connection);
+   fbcdcRelease(phpLink-connection);
+   free(phpLink-connection);
+   phpLink-connection = NULL;
+   if (phpLink-databaseName) 
free(phpLink-databaseName);
+   phpLink-databaseName = NULL;
+   }
+   else {
+   fbcmdRelease(md);
+   }
}
else {
 

[PHP-CVS] cvs: php-src(PHP_5_1) / php.ini-dist php.ini-recommended /ext/fbsql php_fbsql.c php_fbsql.h

2006-08-14 Thread Frank M. Kromann
fmk Mon Aug 14 18:40:20 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-srcphp.ini-dist php.ini-recommended 
/php-src/ext/fbsql  php_fbsql.c php_fbsql.h 
  Log:
  MFH: Cleanup before reusing failed persistant connection. Better formating of 
timestamp and decimal values
  
http://cvs.php.net/viewvc.cgi/php-src/php.ini-dist?r1=1.231.2.10r2=1.231.2.11diff_format=u
Index: php-src/php.ini-dist
diff -u php-src/php.ini-dist:1.231.2.10 php-src/php.ini-dist:1.231.2.11
--- php-src/php.ini-dist:1.231.2.10 Wed Feb  8 23:43:48 2006
+++ php-src/php.ini-distMon Aug 14 18:40:19 2006
@@ -1148,6 +1148,7 @@
 [FrontBase]
 ;fbsql.allow_persistent = On
 ;fbsql.autocommit = On
+;fbsql.show_timestamp_decimals = Off
 ;fbsql.default_database =
 ;fbsql.default_database_password =
 ;fbsql.default_host =
http://cvs.php.net/viewvc.cgi/php-src/php.ini-recommended?r1=1.179.2.11r2=1.179.2.12diff_format=u
Index: php-src/php.ini-recommended
diff -u php-src/php.ini-recommended:1.179.2.11 
php-src/php.ini-recommended:1.179.2.12
--- php-src/php.ini-recommended:1.179.2.11  Wed Feb  8 23:43:48 2006
+++ php-src/php.ini-recommended Mon Aug 14 18:40:19 2006
@@ -1206,6 +1206,7 @@
 [FrontBase]
 ;fbsql.allow_persistent = On
 ;fbsql.autocommit = On
+;fbsql.show_timestamp_decimals = Off
 ;fbsql.default_database =
 ;fbsql.default_database_password =
 ;fbsql.default_host =
http://cvs.php.net/viewvc.cgi/php-src/ext/fbsql/php_fbsql.c?r1=1.114.2.3r2=1.114.2.4diff_format=u
Index: php-src/ext/fbsql/php_fbsql.c
diff -u php-src/ext/fbsql/php_fbsql.c:1.114.2.3 
php-src/ext/fbsql/php_fbsql.c:1.114.2.4
--- php-src/ext/fbsql/php_fbsql.c:1.114.2.3 Sun Jan  1 12:50:06 2006
+++ php-src/ext/fbsql/php_fbsql.c   Mon Aug 14 18:40:20 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_fbsql.c,v 1.114.2.3 2006/01/01 12:50:06 sniper Exp $ */
+/* $Id: php_fbsql.c,v 1.114.2.4 2006/08/14 18:40:20 fmk Exp $ */
 
 /* TODO:
  *
@@ -58,6 +58,10 @@
 
 #define HAVE_FBSQL 1
 
+#ifndef min
+# define min(a,b) ((a)(b)?(a):(b))
+#endif
+
 #if HAVE_FBSQL
 #include php_fbsql.h
 #include signal.h
@@ -379,6 +383,7 @@
STD_PHP_INI_BOOLEAN  (fbsql.allow_persistent, 
1,PHP_INI_SYSTEM, OnUpdateBool,   allowPersistent,  
zend_fbsql_globals, fbsql_globals)
STD_PHP_INI_BOOLEAN  (fbsql.generate_warnings,
0,PHP_INI_SYSTEM, OnUpdateBool,   generateWarnings, 
zend_fbsql_globals, fbsql_globals)
STD_PHP_INI_BOOLEAN  (fbsql.autocommit,   
1,PHP_INI_SYSTEM, OnUpdateBool,   autoCommit,   
zend_fbsql_globals, fbsql_globals)
+   STD_PHP_INI_BOOLEAN  (fbsql.show_timestamp_decimals,  0,
PHP_INI_SYSTEM, OnUpdateBool,   showTimestampDecimals,  
zend_fbsql_globals, fbsql_globals)
STD_PHP_INI_ENTRY_EX (fbsql.max_persistent,   
-1,   PHP_INI_SYSTEM, OnUpdateLong,   maxPersistent,
zend_fbsql_globals, fbsql_globals, display_link_numbers)
STD_PHP_INI_ENTRY_EX (fbsql.max_links,
128,  PHP_INI_SYSTEM, OnUpdateLong,   maxLinks, 
zend_fbsql_globals, fbsql_globals, display_link_numbers)
STD_PHP_INI_ENTRY_EX (fbsql.max_connections,  
128,  PHP_INI_SYSTEM, OnUpdateLong,   maxConnections,   
zend_fbsql_globals, fbsql_globals, display_link_numbers)
@@ -540,7 +545,26 @@
if (persistent) {
if (zend_hash_find(EG(persistent_list), name, strlen(name) + 
1, (void **)lep) == SUCCESS)
{
+   FBCMetaData *md;
phpLink = (PHPFBLink*)lep-ptr;
+   // Check if connection still there.
+   md = fbcdcRollback(phpLink-connection);
+   if ( !mdOk(phpLink, md, Rollback;) ) {
+   if (FB_SQL_G(generateWarnings)) {
+   php_error_docref(NULL TSRMLS_CC, 
E_WARNING, FrontBase link is not connected, ty to reconnect.);
+   }
+   // Make sure select_db will reconnect.
+   fbcmdRelease(md);
+   fbcdcClose(phpLink-connection);
+   fbcdcRelease(phpLink-connection);
+   free(phpLink-connection);
+   phpLink-connection = NULL;
+   if (phpLink-databaseName) 
free(phpLink-databaseName);
+   phpLink-databaseName = NULL;
+   }
+   else {
+   fbcmdRelease(md);
+   }
}
else {
zend_rsrc_list_entry le;
@@ -2509,8 +2533,6 @@
  

[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/date/tests oo_002.phpt

2006-08-14 Thread Michael Wallner
mikeMon Aug 14 20:02:52 2006 UTC

  Added files: 
/php-src/ext/date/tests oo_002.phpt 

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  - add cloning support to DateTime classes
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.110r2=1.111diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.110 php-src/ext/date/php_date.c:1.111
--- php-src/ext/date/php_date.c:1.110   Tue Aug  1 16:45:24 2006
+++ php-src/ext/date/php_date.c Mon Aug 14 20:02:52 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.110 2006/08/01 16:45:24 mike Exp $ */
+/* $Id: php_date.c,v 1.111 2006/08/14 20:02:52 mike Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -299,6 +299,8 @@
 static void date_object_free_storage_timezone(void *object TSRMLS_DC);
 static zend_object_value date_object_new_date(zend_class_entry *class_type 
TSRMLS_DC);
 static zend_object_value date_object_new_timezone(zend_class_entry *class_type 
TSRMLS_DC);
+static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC);
+static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC);
 
 /* {{{ Module struct */
 zend_module_entry date_module_entry = {
@@ -1570,7 +1572,7 @@
ce_date.create_object = date_object_new_date;
date_ce_date = zend_register_internal_class_ex(ce_date, NULL, NULL 
TSRMLS_CC);
memcpy(date_object_handlers_date, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
-   date_object_handlers_date.clone_obj = NULL;
+   date_object_handlers_date.clone_obj = date_object_clone_date;
 
 #define REGISTER_DATE_CLASS_CONST_STRING(const_name, value) \
zend_declare_class_constant_stringl(date_ce_date, const_name, 
sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC);
@@ -1592,10 +1594,10 @@
ce_timezone.create_object = date_object_new_timezone;
date_ce_timezone = zend_register_internal_class_ex(ce_timezone, NULL, 
NULL TSRMLS_CC);
memcpy(date_object_handlers_timezone, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
-   date_object_handlers_timezone.clone_obj = NULL;
+   date_object_handlers_timezone.clone_obj = date_object_clone_timezone;
 }
 
-static zend_object_value date_object_new_date(zend_class_entry *class_type 
TSRMLS_DC)
+inline zend_object_value date_object_new_date_ex(zend_class_entry *class_type, 
php_date_obj **ptr TSRMLS_DC)
 {
php_date_obj *intern;
zend_object_value retval;
@@ -1603,6 +1605,9 @@
 
intern = emalloc(sizeof(php_date_obj));
memset(intern, 0, sizeof(php_date_obj));
+   if (ptr) {
+   *ptr = intern;
+   }

zend_object_std_init(intern-std, class_type TSRMLS_CC);
zend_hash_copy(intern-std.properties, class_type-default_properties, 
(copy_ctor_func_t) zval_add_ref, (void *) tmp, sizeof(zval *));
@@ -1613,7 +1618,34 @@
return retval;
 }
 
-static zend_object_value date_object_new_timezone(zend_class_entry *class_type 
TSRMLS_DC)
+static zend_object_value date_object_new_date(zend_class_entry *class_type 
TSRMLS_DC)
+{
+   return date_object_new_date_ex(class_type, NULL TSRMLS_CC);
+}
+
+static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC)
+{
+   zend_object *old_zo = zend_objects_get_address(this_ptr TSRMLS_CC);
+   php_date_obj *old_obj = (php_date_obj *) 
zend_object_store_get_object(this_ptr TSRMLS_CC);
+   php_date_obj *new_obj = NULL;
+   zend_object_value new_ov = date_object_new_date_ex(old_zo-ce, new_obj 
TSRMLS_CC);
+   
+   zend_objects_clone_members(new_obj-std, new_ov, old_zo, 
Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC);
+   
+   /* this should probably moved to a new `timelib_time 
*timelime_time_clone(timelib_time *)` */
+   new_obj-time = timelib_time_ctor();
+   *new_obj-time = *old_obj-time;
+   if (old_obj-time-tz_abbr) {
+   new_obj-time-tz_abbr = strdup(old_obj-time-tz_abbr);
+   }
+   if (old_obj-time-tz_info) {
+   new_obj-time-tz_info = 
timelib_tzinfo_clone(old_obj-time-tz_info);
+   }
+   
+   return new_ov;
+}
+
+inline zend_object_value date_object_new_timezone_ex(zend_class_entry 
*class_type, php_timezone_obj **ptr TSRMLS_DC)
 {
php_timezone_obj *intern;
zend_object_value retval;
@@ -1621,6 +1653,9 @@
 
intern = emalloc(sizeof(php_timezone_obj));
memset(intern, 0, sizeof(php_timezone_obj));
+   if (ptr) {
+   *ptr = intern;
+   }
 
zend_object_std_init(intern-std, class_type TSRMLS_CC);
zend_hash_copy(intern-std.properties, class_type-default_properties, 
(copy_ctor_func_t) zval_add_ref, (void *) tmp, sizeof(zval *));
@@ -1631,6 +1666,24 @@
return retval;
 }
 
+static zend_object_value date_object_new_timezone(zend_class_entry 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date php_date.c /ext/date/tests oo_002.phpt

2006-08-14 Thread Michael Wallner
mikeMon Aug 14 20:03:11 2006 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests oo_002.phpt 

  Modified files:  
/php-src/ext/date   php_date.c 
  Log:
  MFH: add cloning support to DateTime classes
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.43.2.45.2.23r2=1.43.2.45.2.24diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.43.2.45.2.23 
php-src/ext/date/php_date.c:1.43.2.45.2.24
--- php-src/ext/date/php_date.c:1.43.2.45.2.23  Tue Aug  1 16:45:40 2006
+++ php-src/ext/date/php_date.c Mon Aug 14 20:03:11 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_date.c,v 1.43.2.45.2.23 2006/08/01 16:45:40 mike Exp $ */
+/* $Id: php_date.c,v 1.43.2.45.2.24 2006/08/14 20:03:11 mike Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -296,6 +296,8 @@
 static void date_object_free_storage_timezone(void *object TSRMLS_DC);
 static zend_object_value date_object_new_date(zend_class_entry *class_type 
TSRMLS_DC);
 static zend_object_value date_object_new_timezone(zend_class_entry *class_type 
TSRMLS_DC);
+static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC);
+static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC);
 
 /* {{{ Module struct */
 zend_module_entry date_module_entry = {
@@ -1442,7 +1444,7 @@
ce_date.create_object = date_object_new_date;
date_ce_date = zend_register_internal_class_ex(ce_date, NULL, NULL 
TSRMLS_CC);
memcpy(date_object_handlers_date, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
-   date_object_handlers_date.clone_obj = NULL;
+   date_object_handlers_date.clone_obj = date_object_clone_date;
 
 #define REGISTER_DATE_CLASS_CONST_STRING(const_name, value) \
zend_declare_class_constant_stringl(date_ce_date, const_name, 
sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC);
@@ -1464,10 +1466,10 @@
ce_timezone.create_object = date_object_new_timezone;
date_ce_timezone = zend_register_internal_class_ex(ce_timezone, NULL, 
NULL TSRMLS_CC);
memcpy(date_object_handlers_timezone, zend_get_std_object_handlers(), 
sizeof(zend_object_handlers));
-   date_object_handlers_timezone.clone_obj = NULL;
+   date_object_handlers_timezone.clone_obj = date_object_clone_timezone;
 }
 
-static zend_object_value date_object_new_date(zend_class_entry *class_type 
TSRMLS_DC)
+inline zend_object_value date_object_new_date_ex(zend_class_entry *class_type, 
php_date_obj **ptr TSRMLS_DC)
 {
php_date_obj *intern;
zend_object_value retval;
@@ -1475,6 +1477,9 @@
 
intern = emalloc(sizeof(php_date_obj));
memset(intern, 0, sizeof(php_date_obj));
+   if (ptr) {
+   *ptr = intern;
+   }

zend_object_std_init(intern-std, class_type TSRMLS_CC);
zend_hash_copy(intern-std.properties, class_type-default_properties, 
(copy_ctor_func_t) zval_add_ref, (void *) tmp, sizeof(zval *));
@@ -1485,7 +1490,34 @@
return retval;
 }
 
-static zend_object_value date_object_new_timezone(zend_class_entry *class_type 
TSRMLS_DC)
+static zend_object_value date_object_new_date(zend_class_entry *class_type 
TSRMLS_DC)
+{
+   return date_object_new_date_ex(class_type, NULL TSRMLS_CC);
+}
+
+static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC)
+{
+   zend_object *old_zo = zend_objects_get_address(this_ptr TSRMLS_CC);
+   php_date_obj *old_obj = (php_date_obj *) 
zend_object_store_get_object(this_ptr TSRMLS_CC);
+   php_date_obj *new_obj = NULL;
+   zend_object_value new_ov = date_object_new_date_ex(old_zo-ce, new_obj 
TSRMLS_CC);
+   
+   zend_objects_clone_members(new_obj-std, new_ov, old_zo, 
Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC);
+   
+   /* this should probably moved to a new `timelib_time 
*timelime_time_clone(timelib_time *)` */
+   new_obj-time = timelib_time_ctor();
+   *new_obj-time = *old_obj-time;
+   if (old_obj-time-tz_abbr) {
+   new_obj-time-tz_abbr = strdup(old_obj-time-tz_abbr);
+   }
+   if (old_obj-time-tz_info) {
+   new_obj-time-tz_info = 
timelib_tzinfo_clone(old_obj-time-tz_info);
+   }
+   
+   return new_ov;
+}
+
+inline zend_object_value date_object_new_timezone_ex(zend_class_entry 
*class_type, php_timezone_obj **ptr TSRMLS_DC)
 {
php_timezone_obj *intern;
zend_object_value retval;
@@ -1493,6 +1525,9 @@
 
intern = emalloc(sizeof(php_timezone_obj));
memset(intern, 0, sizeof(php_timezone_obj));
+   if (ptr) {
+   *ptr = intern;
+   }
 
zend_object_std_init(intern-std, class_type TSRMLS_CC);
zend_hash_copy(intern-std.properties, class_type-default_properties, 
(copy_ctor_func_t) zval_add_ref, (void *) tmp, sizeof(zval *));
@@ -1503,6 +1538,24 @@

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/bz2 bz2.c php_bz2.h /ext/ctype ctype.c php_ctype.h /ext/json json.c php_json.h /ext/pspell php_pspell.h pspell.c /ext/tidy php_tidy.h tidy.c /ext/zlib php_zli

2006-08-14 Thread Nuno Lopes
nlopess Mon Aug 14 20:08:18 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/bz2bz2.c php_bz2.h 
/php-src/ext/ctype  ctype.c php_ctype.h 
/php-src/ext/json   json.c php_json.h 
/php-src/ext/pspell php_pspell.h pspell.c 
/php-src/ext/tidy   php_tidy.h tidy.c 
/php-src/ext/zlib   php_zlib.h zlib.c zlib_fopen_wrapper.c 
  Log:
  move static declaration to *.c files
  mroe static/const keywording
  http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2.c?r1=1.14.2.3.2.6r2=1.14.2.3.2.7diff_format=u
Index: php-src/ext/bz2/bz2.c
diff -u php-src/ext/bz2/bz2.c:1.14.2.3.2.6 php-src/ext/bz2/bz2.c:1.14.2.3.2.7
--- php-src/ext/bz2/bz2.c:1.14.2.3.2.6  Mon Aug 14 14:53:23 2006
+++ php-src/ext/bz2/bz2.c   Mon Aug 14 20:08:17 2006
@@ -16,7 +16,7 @@
   +--+
 */
  
-/* $Id: bz2.c,v 1.14.2.3.2.6 2006/08/14 14:53:23 nlopess Exp $ */
+/* $Id: bz2.c,v 1.14.2.3.2.7 2006/08/14 20:08:17 nlopess Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -40,6 +40,17 @@
 #define PHP_BZ_ERRSTR  1
 #define PHP_BZ_ERRBOTH 2
 
+static PHP_MINIT_FUNCTION(bz2);
+static PHP_MSHUTDOWN_FUNCTION(bz2);
+static PHP_MINFO_FUNCTION(bz2);
+static PHP_FUNCTION(bzopen);
+static PHP_FUNCTION(bzread);
+static PHP_FUNCTION(bzerrno);
+static PHP_FUNCTION(bzerrstr);
+static PHP_FUNCTION(bzerror);
+static PHP_FUNCTION(bzcompress);
+static PHP_FUNCTION(bzdecompress);
+
 /* {{{ arginfo */
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_bzread, 0, 0, 1)
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/php_bz2.h?r1=1.7.2.1.2.1r2=1.7.2.1.2.2diff_format=u
Index: php-src/ext/bz2/php_bz2.h
diff -u php-src/ext/bz2/php_bz2.h:1.7.2.1.2.1 
php-src/ext/bz2/php_bz2.h:1.7.2.1.2.2
--- php-src/ext/bz2/php_bz2.h:1.7.2.1.2.1   Mon Aug 14 14:53:23 2006
+++ php-src/ext/bz2/php_bz2.h   Mon Aug 14 20:08:17 2006
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_bz2.h,v 1.7.2.1.2.1 2006/08/14 14:53:23 nlopess Exp $ */
+/* $Id: php_bz2.h,v 1.7.2.1.2.2 2006/08/14 20:08:17 nlopess Exp $ */
 
 #ifndef PHP_BZ2_H
 #define PHP_BZ2_H
@@ -29,17 +29,6 @@
 /* Bzip2 includes */
 #include bzlib.h
 
-static PHP_MINIT_FUNCTION(bz2);
-static PHP_MSHUTDOWN_FUNCTION(bz2);
-static PHP_MINFO_FUNCTION(bz2);
-static PHP_FUNCTION(bzopen);
-static PHP_FUNCTION(bzread);
-static PHP_FUNCTION(bzerrno);
-static PHP_FUNCTION(bzerrstr);
-static PHP_FUNCTION(bzerror);
-static PHP_FUNCTION(bzcompress);
-static PHP_FUNCTION(bzdecompress);
-
 #else
 #define phpext_bz2_ptr NULL
 #endif
http://cvs.php.net/viewvc.cgi/php-src/ext/ctype/ctype.c?r1=1.34.2.3.2.2r2=1.34.2.3.2.3diff_format=u
Index: php-src/ext/ctype/ctype.c
diff -u php-src/ext/ctype/ctype.c:1.34.2.3.2.2 
php-src/ext/ctype/ctype.c:1.34.2.3.2.3
--- php-src/ext/ctype/ctype.c:1.34.2.3.2.2  Mon Aug 14 14:53:23 2006
+++ php-src/ext/ctype/ctype.c   Mon Aug 14 20:08:17 2006
@@ -40,6 +40,24 @@
 /* True global resources - no need for thread safety here */
 /* static int le_ctype; */
 
+static PHP_MINIT_FUNCTION(ctype);
+static PHP_MSHUTDOWN_FUNCTION(ctype);
+static PHP_RINIT_FUNCTION(ctype);
+static PHP_RSHUTDOWN_FUNCTION(ctype);
+static PHP_MINFO_FUNCTION(ctype);
+
+static PHP_FUNCTION(ctype_alnum);
+static PHP_FUNCTION(ctype_alpha);
+static PHP_FUNCTION(ctype_cntrl);
+static PHP_FUNCTION(ctype_digit);
+static PHP_FUNCTION(ctype_lower);
+static PHP_FUNCTION(ctype_graph);
+static PHP_FUNCTION(ctype_print);
+static PHP_FUNCTION(ctype_punct);
+static PHP_FUNCTION(ctype_space);
+static PHP_FUNCTION(ctype_upper);
+static PHP_FUNCTION(ctype_xdigit);
+
 /* {{{ arginfo */
 static
 ZEND_BEGIN_ARG_INFO(arginfo_ctype_alnum, 0)
http://cvs.php.net/viewvc.cgi/php-src/ext/ctype/php_ctype.h?r1=1.12.2.1.2.1r2=1.12.2.1.2.2diff_format=u
Index: php-src/ext/ctype/php_ctype.h
diff -u php-src/ext/ctype/php_ctype.h:1.12.2.1.2.1 
php-src/ext/ctype/php_ctype.h:1.12.2.1.2.2
--- php-src/ext/ctype/php_ctype.h:1.12.2.1.2.1  Mon Aug 14 14:53:23 2006
+++ php-src/ext/ctype/php_ctype.h   Mon Aug 14 20:08:17 2006
@@ -33,24 +33,6 @@
 #define PHP_CTYPE_API
 #endif
 
-static PHP_MINIT_FUNCTION(ctype);
-static PHP_MSHUTDOWN_FUNCTION(ctype);
-static PHP_RINIT_FUNCTION(ctype);
-static PHP_RSHUTDOWN_FUNCTION(ctype);
-static PHP_MINFO_FUNCTION(ctype);
-
-static PHP_FUNCTION(ctype_alnum);
-static PHP_FUNCTION(ctype_alpha);
-static PHP_FUNCTION(ctype_cntrl);
-static PHP_FUNCTION(ctype_digit);
-static PHP_FUNCTION(ctype_lower);
-static PHP_FUNCTION(ctype_graph);
-static PHP_FUNCTION(ctype_print);
-static PHP_FUNCTION(ctype_punct);
-static PHP_FUNCTION(ctype_space);
-static PHP_FUNCTION(ctype_upper);
-static PHP_FUNCTION(ctype_xdigit);
-
 /* 
Declare any global variables you may need between the BEGIN
and END macros here: 
http://cvs.php.net/viewvc.cgi/php-src/ext/json/json.c?r1=1.9.2.5r2=1.9.2.6diff_format=u
Index: php-src/ext/json/json.c
diff -u php-src/ext/json/json.c:1.9.2.5 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pdo_mysql config.m4

2006-08-14 Thread Antony Dovgal
tony2001Mon Aug 14 20:11:31 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdo_mysql  config.m4 
  Log:
  fix #38451 (PDO_MYSQL doesn't compile on Solaris)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_mysql/config.m4?r1=1.25.2.7.2.2r2=1.25.2.7.2.3diff_format=u
Index: php-src/ext/pdo_mysql/config.m4
diff -u php-src/ext/pdo_mysql/config.m4:1.25.2.7.2.2 
php-src/ext/pdo_mysql/config.m4:1.25.2.7.2.3
--- php-src/ext/pdo_mysql/config.m4:1.25.2.7.2.2Thu Jun  1 19:14:48 2006
+++ php-src/ext/pdo_mysql/config.m4 Mon Aug 14 20:11:31 2006
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.25.2.7.2.2 2006/06/01 19:14:48 mike Exp $
+dnl $Id: config.m4,v 1.25.2.7.2.3 2006/08/14 20:11:31 tony2001 Exp $
 dnl
 
 if test $PHP_PDO != no; then
@@ -96,6 +96,7 @@
 
   PHP_CHECK_LIBRARY($PDO_MYSQL_LIBNAME, mysql_query,
   [
+PHP_EVAL_INCLINE($PDO_MYSQL_INCLUDE)
 PHP_EVAL_LIBLINE($PDO_MYSQL_LIBS, PDO_MYSQL_SHARED_LIBADD)
   ],[
 AC_MSG_ERROR([mysql_query missing!?])
@@ -124,7 +125,7 @@
 AC_MSG_RESULT($pdo_inc_path)
   ])
 
-  PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, 
$ext_shared,,-I$pdo_inc_path $PDO_MYSQL_INCLUDE)
+  PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c, 
$ext_shared,,-I$pdo_inc_path)
   ifdef([PHP_ADD_EXTENSION_DEP],
   [
 PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2006-08-14 Thread Antony Dovgal
tony2001Mon Aug 14 20:11:52 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.201r2=1.2027.2.547.2.202diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.201 php-src/NEWS:1.2027.2.547.2.202
--- php-src/NEWS:1.2027.2.547.2.201 Mon Aug 14 16:16:42 2006
+++ php-src/NEWSMon Aug 14 20:11:52 2006
@@ -38,6 +38,7 @@
 - Fixed phpinfo() cutoff of variables at \0. (Ilia)
 - Fixed a bug in the filter extension that prevented magic_quotes_gpc from
   being applied when RAW filter is used. (Ilia)
+- Fixed bug #38451 (PDO_MYSQL doesn't compile on Solaris). (Tony)
 - Fixed bug #38450 (constructor is not called for classes used in userspace 
   stream wrappers). (Tony)
 - Fixed bug #38438 (DOMNodeList-item(0) segfault on empty NodeList). (Ilia)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] Re: [PHP-DEV] Re: cvs: php-src /ext/tidy README libtidy.txt php_tidy.h tidy.c

2006-08-14 Thread Nuno Lopes

Nuno Lopes wrote:

nlopess Mon Aug 14 15:17:03 2006 UTC

  Removed files:
/php-src/ext/tidy libtidy.txt

  Modified files:
/php-src/ext/tidy README php_tidy.h tidy.c
  Log:
  MFB: static keywording


Hi Nuno,

can you please put static function declarations into the source file
(where the functions are defined in) and remove them from the header file.

Thanks,
--
Michael



Done,
Nuno 


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src / unicode-progress.txt /ext/standard string.c

2006-08-14 Thread Andrei Zmievski
andrei  Mon Aug 14 20:43:23 2006 UTC

  Modified files:  
/php-srcunicode-progress.txt 
/php-src/ext/standard   string.c 
  Log:
  Unicode support in chunk_split().
  
  
http://cvs.php.net/viewvc.cgi/php-src/unicode-progress.txt?r1=1.41r2=1.42diff_format=u
Index: php-src/unicode-progress.txt
diff -u php-src/unicode-progress.txt:1.41 php-src/unicode-progress.txt:1.42
--- php-src/unicode-progress.txt:1.41   Wed Aug  9 20:19:06 2006
+++ php-src/unicode-progress.txtMon Aug 14 20:43:23 2006
@@ -16,9 +16,6 @@
 
   string.c
   
-chunk_split()
-Params API, Unicode upgrades. Split on codepoint level.
-
 count_chars()
 Params API. Do we really want to go through the whole Unicode table?
 May need to use hashtable instead of array.
@@ -179,6 +176,7 @@
 basename()
 bin2hex()
 chr()
+chunk_split()
 dirname()
 explode()
 implode()
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.576r2=1.577diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.576 php-src/ext/standard/string.c:1.577
--- php-src/ext/standard/string.c:1.576 Mon Aug 14 11:59:07 2006
+++ php-src/ext/standard/string.c   Mon Aug 14 20:43:23 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.576 2006/08/14 11:59:07 edink Exp $ */
+/* $Id: string.c,v 1.577 2006/08/14 20:43:23 andrei Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -2994,69 +2994,67 @@
 
 /* {{{ php_chunk_split
  */
-static char *php_chunk_split(char *src, int srclen, char *end, int endlen, int 
chunklen, int *destlen)
+static char* php_chunk_split(char *src, int srclen, char *end, int endlen, int 
chunklen, int *destlen, zend_uchar str_type)
 {
char *dest;
char *p, *q;
int chunks; /* complete chunks! */
int restlen;
+   int charsize = sizeof(char);
+
+   if (str_type == IS_UNICODE) {
+   charsize = sizeof(UChar);
+   }
 
chunks = srclen / chunklen;
restlen = srclen - chunks * chunklen; /* srclen % chunklen */
 
-   dest = safe_emalloc((srclen + (chunks + 1) * endlen + 1), sizeof(char), 
0);
+   dest = safe_emalloc((srclen + (chunks + 1) * endlen + 1), charsize, 0);
 
-   for (p = src, q = dest; p  (src + srclen - chunklen + 1); ) {
-   memcpy(q, p, chunklen);
-   q += chunklen;
-   memcpy(q, end, endlen);
-   q += endlen;
-   p += chunklen;
+   for (p = src, q = dest; p  (src + charsize * (srclen - chunklen + 1)); 
) {
+   memcpy(q, p, chunklen * charsize);
+   q += chunklen * charsize;
+   memcpy(q, end, endlen * charsize);
+   q += endlen * charsize;
+   p += chunklen * charsize;
}
 
if (restlen) {
-   memcpy(q, p, restlen);
-   q += restlen;
-   memcpy(q, end, endlen);
-   q += endlen;
+   memcpy(q, p, restlen * charsize);
+   q += restlen * charsize;
+   memcpy(q, end, endlen * charsize);
+   q += endlen * charsize;
}
 
-   *q = '\0';
+   if (str_type == IS_UNICODE) {
+   *(UChar*)q = 0;
+   } else {
+   *q = '\0';
+   }
if (destlen) {
-   *destlen = q - dest;
+   *destlen = (q - dest) / charsize;
}
 
-   return(dest);
+   return (dest);
 }
 /* }}} */
 
-/* {{{ proto string chunk_split(string str [, int chunklen [, string ending]])
+/* {{{ proto string chunk_split(string str [, int chunklen [, string ending]]) 
U
Returns split line */
 PHP_FUNCTION(chunk_split)
 {
-   zval **p_str, **p_chunklen, **p_ending;
-   char *result;
+   zstr str, ending = NULL_ZSTR;
+   int str_len, ending_len;
+   zstr result;
char *end= \r\n;
-   int endlen   = 2;
+   UChar u_end[3] = { 0x0d, 0x0a, 0x0 };
int chunklen = 76;
int result_len;
-   int argc = ZEND_NUM_ARGS();
-
-   if (argc  1 || argc  3 || zend_get_parameters_ex(argc, p_str, 
p_chunklen, p_ending) == FAILURE) {
-   WRONG_PARAM_COUNT;
-   }
-
-   convert_to_string_ex(p_str);
-
-   if (argc  1) {
-   convert_to_long_ex(p_chunklen);
-   chunklen = Z_LVAL_PP(p_chunklen);
-   }
+   zend_uchar str_type;
 
-   if (argc  2) {
-   convert_to_string_ex(p_ending);
-   end = Z_STRVAL_PP(p_ending);
-   endlen = Z_STRLEN_PP(p_ending);
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, T|lT, str, 
str_len,
+ str_type, chunklen, 
ending, ending_len, str_type) == FAILURE) {
+   return;
}
 
if (chunklen = 0) {
@@ -3064,24 +3062,36 @@
 

[PHP-CVS] cvs: php-src / unicode-progress.txt /ext/standard string.c

2006-08-14 Thread Andrei Zmievski
andrei  Mon Aug 14 21:04:50 2006 UTC

  Modified files:  
/php-srcunicode-progress.txt 
/php-src/ext/standard   string.c 
  Log:
  Unicode support for str_split().
  
  
http://cvs.php.net/viewvc.cgi/php-src/unicode-progress.txt?r1=1.42r2=1.43diff_format=u
Index: php-src/unicode-progress.txt
diff -u php-src/unicode-progress.txt:1.42 php-src/unicode-progress.txt:1.43
--- php-src/unicode-progress.txt:1.42   Mon Aug 14 20:43:23 2006
+++ php-src/unicode-progress.txtMon Aug 14 21:04:50 2006
@@ -49,9 +49,6 @@
 Params API, IS_UNICODE upgrade. Case-folding should be handled
 similar to stristr().
 
-str_split()
-IS_UNICODE support, split on codepoint level.
-
 str_word_count()
 Params API, IS_UNICODE support, using u_isalpha(), etc.
 
@@ -190,6 +187,7 @@
 str_repeat()
 str_rot13()
 str_shuffle()
+str_split()
 strcspn()
 strip_tags()
 stripcslashes()
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.577r2=1.578diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.577 php-src/ext/standard/string.c:1.578
--- php-src/ext/standard/string.c:1.577 Mon Aug 14 20:43:23 2006
+++ php-src/ext/standard/string.c   Mon Aug 14 21:04:50 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.577 2006/08/14 20:43:23 andrei Exp $ */
+/* $Id: string.c,v 1.578 2006/08/14 21:04:50 andrei Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -6973,17 +6973,19 @@
 /* }}} */
 #endif
 
-/* {{{ proto array str_split(string str [, int split_length])
+/* {{{ proto array str_split(string str [, int split_length]) U
Convert a string to an array. If split_length is specified, break the 
string down into chunks each split_length characters long. */
 PHP_FUNCTION(str_split)
 {
-   char *str;
+   zstr str;
int str_len;
long split_length = 1;
char *p;
+   zend_uchar str_type;
int n_reg_segments;
+   int charsize = 1;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|l, str, 
str_len, split_length) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, t|l, str, 
str_len, str_type, split_length) == FAILURE) {
return;
}
 
@@ -6995,20 +6997,23 @@
array_init(return_value);
 
if (split_length = str_len) {
-   add_next_index_stringl(return_value, str, str_len, 1);
+   add_next_index_zstrl(return_value, str, str_len, str_type, 1);
return;
}
 
n_reg_segments = floor(str_len / split_length);
-   p = str;
+   p = str.s;
+   if (str_type == IS_UNICODE) {
+   charsize = 2;
+   }
 
while (n_reg_segments--  0) {
-   add_next_index_stringl(return_value, p, split_length, 1);
-   p += split_length;
+   add_next_index_zstrl(return_value, ZSTR(p), split_length, 
str_type, 1);
+   p += split_length * charsize;
}
 
-   if (p != (str + str_len)) {
-   add_next_index_stringl(return_value, p, (str + str_len - p), 1);
+   if (p != (str.s + str_len * charsize)) {
+   add_next_index_zstrl(return_value, ZSTR(p), (str.s + str_len * 
charsize - p), str_type, 1);
}
 }
 /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src / run-tests.php

2006-08-14 Thread Antony Dovgal
tony2001Mon Aug 14 21:08:02 2006 UTC

  Modified files:  
/php-srcrun-tests.php 
  Log:
  fix my previous patch
  
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.303r2=1.304diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.303 php-src/run-tests.php:1.304
--- php-src/run-tests.php:1.303 Mon Aug 14 10:29:10 2006
+++ php-src/run-tests.php   Mon Aug 14 21:08:02 2006
@@ -23,7 +23,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.303 2006/08/14 10:29:10 tony2001 Exp $ */
+/* $Id: run-tests.php,v 1.304 2006/08/14 21:08:02 tony2001 Exp $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is 
available.
  * In the event it is not, print a nice error message indicating that this 
script will
@@ -400,7 +400,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.303 $'.\n;
+   echo '$Revision: 1.304 $'.\n;
exit(1);
default:
echo Illegal switch specified!\n;
@@ -1360,7 +1360,7 @@
return 'BORKED';
}
save_text($tmp_post, $request);
-   $cmd = USE_ZEND_ALLOC=1 $php$pass_options$ini_settings -f 
\$test_file\ 21  $tmp_post;
+   $cmd = $php$pass_options$ini_settings -f \$test_file\ 21  
$tmp_post;
} elseif (array_key_exists('POST', $section_text)  
!empty($section_text['POST'])) {
 
$post = trim($section_text['POST']);
@@ -1371,7 +1371,7 @@
$env['CONTENT_TYPE']   = 'application/x-www-form-urlencoded';
$env['CONTENT_LENGTH'] = $content_length;
 
-   $cmd = USE_ZEND_ALLOC=1 $php$pass_options$ini_settings -f 
\$test_file\ 21  $tmp_post;
+   $cmd = $php$pass_options$ini_settings -f \$test_file\ 21  
$tmp_post;
 
} else {
 
@@ -1379,11 +1379,13 @@
$env['CONTENT_TYPE']   = '';
$env['CONTENT_LENGTH'] = '';
 
-   $cmd = USE_ZEND_ALLOC=1 $php$pass_options$ini_settings -f 
\$test_file\ $args 21;
+   $cmd = $php$pass_options$ini_settings -f \$test_file\ $args 
21;
}
 
if ($leak_check) {
$cmd = USE_ZEND_ALLOC=0 valgrind -q --tool=memcheck 
--trace-children=yes --log-file-exactly=$memcheck_filename $cmd;
+   } else {
+   $cmd = USE_ZEND_ALLOC=1 .$cmd;
}
 
if ($DETAILED) echo 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / run-tests.php

2006-08-14 Thread Antony Dovgal
tony2001Mon Aug 14 21:08:16 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcrun-tests.php 
  Log:
  fix previous patch
  
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.11r2=1.226.2.37.2.12diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.11 
php-src/run-tests.php:1.226.2.37.2.12
--- php-src/run-tests.php:1.226.2.37.2.11   Mon Aug 14 10:29:20 2006
+++ php-src/run-tests.php   Mon Aug 14 21:08:16 2006
@@ -23,7 +23,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.226.2.37.2.11 2006/08/14 10:29:20 tony2001 Exp $ */
+/* $Id: run-tests.php,v 1.226.2.37.2.12 2006/08/14 21:08:16 tony2001 Exp $ */
 
 /* Sanity check to ensure that pcre extension needed by this script is 
available.
  * In the event it is not, print a nice error message indicating that this 
script will
@@ -397,7 +397,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.226.2.37.2.11 
$'.\n;
+   echo '$Revision: 1.226.2.37.2.12 
$'.\n;
exit(1);
default:
echo Illegal switch '$switch' 
specified!\n;
@@ -1307,7 +1307,7 @@
return 'BORKED';
}
save_text($tmp_post, $request);
-   $cmd = USE_ZEND_ALLOC=1 $php$pass_options$ini_settings -f 
\$test_file\ 21  $tmp_post;
+   $cmd = $php$pass_options$ini_settings -f \$test_file\ 21  
$tmp_post;
} elseif (array_key_exists('POST', $section_text)  
!empty($section_text['POST'])) {
 
$post = trim($section_text['POST']);
@@ -1318,7 +1318,7 @@
$env['CONTENT_TYPE']   = 'application/x-www-form-urlencoded';
$env['CONTENT_LENGTH'] = $content_length;
 
-   $cmd = USE_ZEND_ALLOC=1 $php$pass_options$ini_settings -f 
\$test_file\ 21  $tmp_post;
+   $cmd = $php$pass_options$ini_settings -f \$test_file\ 21  
$tmp_post;
 
} else {
 
@@ -1326,11 +1326,13 @@
$env['CONTENT_TYPE']   = '';
$env['CONTENT_LENGTH'] = '';
 
-   $cmd = USE_ZEND_ALLOC=1 $php$pass_options$ini_settings -f 
\$test_file\ $args 21;
+   $cmd = $php$pass_options$ini_settings -f \$test_file\ $args 
21;
}
 
if ($leak_check) {
$cmd = USE_ZEND_ALLOC=0 valgrind -q --tool=memcheck 
--trace-children=yes --log-file-exactly=$memcheck_filename $cmd;
+   } else {
+   $cmd = USE_ZEND_ALLOC=1 .$cmd;
}
 
if ($DETAILED) echo 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src / unicode-progress.txt /ext/standard string.c

2006-08-14 Thread Andrei Zmievski
andrei  Mon Aug 14 22:00:46 2006 UTC

  Modified files:  
/php-srcunicode-progress.txt 
/php-src/ext/standard   string.c 
  Log:
  Unicode support for strcoll().
  
  
http://cvs.php.net/viewvc.cgi/php-src/unicode-progress.txt?r1=1.43r2=1.44diff_format=u
Index: php-src/unicode-progress.txt
diff -u php-src/unicode-progress.txt:1.43 php-src/unicode-progress.txt:1.44
--- php-src/unicode-progress.txt:1.43   Mon Aug 14 21:04:50 2006
+++ php-src/unicode-progress.txtMon Aug 14 22:00:46 2006
@@ -43,8 +43,6 @@
 Params API. Rest - no idea yet.
 
 str_replace()
-Params API, IS_UNICODE upgrade
-
 stri_replace()
 Params API, IS_UNICODE upgrade. Case-folding should be handled
 similar to stristr().
@@ -52,9 +50,6 @@
 str_word_count()
 Params API, IS_UNICODE support, using u_isalpha(), etc.
 
-strcoll()
-Params API, upgrade to use Collator if TT == IS_UNICODE, test
-
 stristr()
 This is the problematic one. There are a few approaches:
 
@@ -188,6 +183,7 @@
 str_rot13()
 str_shuffle()
 str_split()
+strcoll()
 strcspn()
 strip_tags()
 stripcslashes()
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.578r2=1.579diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.578 php-src/ext/standard/string.c:1.579
--- php-src/ext/standard/string.c:1.578 Mon Aug 14 21:04:50 2006
+++ php-src/ext/standard/string.c   Mon Aug 14 22:00:46 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.578 2006/08/14 21:04:50 andrei Exp $ */
+/* $Id: string.c,v 1.579 2006/08/14 22:00:46 andrei Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -494,24 +494,32 @@
 #endif
 /* }}} */
 
-#ifdef HAVE_STRCOLL
-/* {{{ proto int strcoll(string str1, string str2)
+/* {{{ proto int strcoll(string str1, string str2) U
Compares two strings using the current locale */
 PHP_FUNCTION(strcoll)
 {
-   zval **s1, **s2;
+   zstr s1, s2;
+   int s1_len, s2_len;
+   zend_uchar str_type;
 
-   if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, s1, s2) == 
FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, TT, s1, s1_len,
+ str_type, s2, 
s2_len, str_type) == FAILURE) {
+   return;
+   }
+
+   if (str_type == IS_UNICODE) {
+   
RETURN_LONG(ZEND_COLL_RESULT(ucol_strcoll(UG(default_collator)-coll, s1.u, 
s1_len, s2.u, s2_len)));
+   } else {
+#ifdef HAVE_STRCOLL
+   RETURN_LONG(strcoll((const char *) s1.s,
+   (const char *) s2.s));
+#else
+   RETURN_FALSE;
+#endif
}
-   convert_to_string_ex(s1);
-   convert_to_string_ex(s2);
 
-   RETURN_LONG(strcoll((const char *) Z_STRVAL_PP(s1),
-   (const char *) Z_STRVAL_PP(s2)));
 }
 /* }}} */
-#endif
 
 /* {{{ php_charmask
  * Fills a 256-byte bytemask with input. You can specify a range like 'a..z',

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/openssl openssl.c php_openssl.h

2006-08-14 Thread Pierre-Alain Joye
pajoye  Tue Aug 15 00:38:04 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/opensslopenssl.c php_openssl.h 
  Log:
  - add OPENSSL_KEYTYPE_EC constant
  - openssl_pkey_get_details(), returns the key details
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.202r2=1.2027.2.547.2.203diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.202 php-src/NEWS:1.2027.2.547.2.203
--- php-src/NEWS:1.2027.2.547.2.202 Mon Aug 14 20:11:52 2006
+++ php-src/NEWSTue Aug 15 00:38:04 2006
@@ -26,9 +26,9 @@
 
 - Improved OpenSSL extension: (Pierre)
   . Added support for all supported algorithms in openssl_verify
-  . Implement #36732 (req/x509 extensions support for openssl_csr_new and
-openssl_csr_sign) (ben at psc dot edu, Pierre)
-  . Implement #28382 (openssl_x509_parse() extensions support)
+  . Added openssl_pkey_get_details, returns the details of a key
+  . Added x509 v3 extensions support
+  . Added a new constant OPENSSL_KEYTYPE_EC
 
 - Fixed overflow on 64bit systems in str_repeat() and wordwrap(). (Stefan E.)
 - Disabled CURLOPT_FOLLOWLOCATION in curl when open_basedir or safe_mode are
@@ -106,8 +106,11 @@
   destruction). (Ilia)
 - Fixed bug #37265 (Added missing safe_mode  open_basedir checks to
   imap_body()). (Ilia)
+- Implement #36732 (req/x509 extensions support for openssl_csr_new and
+  openssl_csr_sign) (ben at psc dot edu, Pierre)
 - Fixed bug #35973 (Error ORA-24806 occurs when trying to fetch a NCLOB 
   field). (Tony)
+- Implement #28382 (openssl_x509_parse() extensions support) (Pierre)
 
 24 Jul 2006, PHP 5.2.0RC1
 - Updated bundled MySQL client library to version 5.0.22 in the Windows
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.9r2=1.98.2.5.2.10diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.9 
php-src/ext/openssl/openssl.c:1.98.2.5.2.10
--- php-src/ext/openssl/openssl.c:1.98.2.5.2.9  Mon Jul 31 03:41:19 2006
+++ php-src/ext/openssl/openssl.c   Tue Aug 15 00:38:04 2006
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.98.2.5.2.9 2006/07/31 03:41:19 iliaa Exp $ */
+/* $Id: openssl.c,v 1.98.2.5.2.10 2006/08/15 00:38:04 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -60,11 +60,17 @@
ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();
 
+/* FIXME: Use the openssl constants instead of
+ * enum. It is now impossible to match real values
+ * against php constants. Also sorry to break the
+ * enum principles here, BC...
+ */
 enum php_openssl_key_type {
OPENSSL_KEYTYPE_RSA,
OPENSSL_KEYTYPE_DSA,
OPENSSL_KEYTYPE_DH,
-   OPENSSL_KEYTYPE_DEFAULT = OPENSSL_KEYTYPE_RSA
+   OPENSSL_KEYTYPE_DEFAULT = OPENSSL_KEYTYPE_RSA,
+   OPENSSL_KEYTYPE_EC = OPENSSL_KEYTYPE_DH +1
 };
 
 enum php_openssl_cipher_type {
@@ -87,6 +93,7 @@
PHP_FE(openssl_pkey_export_to_file, NULL)
PHP_FE(openssl_pkey_get_private,NULL)
PHP_FE(openssl_pkey_get_public, NULL)
+   PHP_FE(openssl_pkey_get_details,NULL)
 
PHP_FALIAS(openssl_free_key,openssl_pkey_free,  
NULL)
PHP_FALIAS(openssl_get_privatekey,  openssl_pkey_get_private,   
NULL)
@@ -680,6 +687,7 @@
REGISTER_LONG_CONSTANT(OPENSSL_KEYTYPE_DSA, OPENSSL_KEYTYPE_DSA, 
CONST_CS|CONST_PERSISTENT);
 #endif
REGISTER_LONG_CONSTANT(OPENSSL_KEYTYPE_DH, OPENSSL_KEYTYPE_DH, 
CONST_CS|CONST_PERSISTENT);
+   REGISTER_LONG_CONSTANT(OPENSSL_KEYTYPE_EC, OPENSSL_KEYTYPE_EC, 
CONST_CS|CONST_PERSISTENT);
 
/* Determine default SSL configuration file */
config_filename = getenv(OPENSSL_CONF);
@@ -2216,6 +2224,61 @@
 
 /* }}} */
 
+/* {{{ proto resource openssl_pkey_get_details(resource key)
+   returns an array with the key details (bits, pkey, type)*/
+PHP_FUNCTION(openssl_pkey_get_details)
+{
+   zval *key;
+   EVP_PKEY *pkey;
+   BIO *out;
+   unsigned int pbio_len;
+   char *pbio;
+   long ktype;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, r, key) == 
FAILURE) {
+   return;
+   }
+   ZEND_FETCH_RESOURCE(pkey, EVP_PKEY *, key, -1, OpenSSL key, le_key);
+   if (!pkey) {
+   RETURN_FALSE;
+   }
+   out = BIO_new(BIO_s_mem());
+   PEM_write_bio_PUBKEY(out, pkey);
+   pbio_len = BIO_get_mem_data(out, pbio);
+
+   array_init(return_value);
+   add_assoc_long(return_value, bits, EVP_PKEY_bits(pkey));
+   add_assoc_stringl(return_value, key, pbio, pbio_len, 1);
+   /*TODO: Use the real values once the openssl constants are used 
+* See the enum at the top of this file
+*/
+   switch (EVP_PKEY_type(pkey-type)) {
+   case EVP_PKEY_RSA:
+   case EVP_PKEY_RSA2:
+