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

2006-10-06 Thread changelog
changelog   Sat Oct  7 01:30:57 2006 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2475r2=1.2476diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2475 php-src/ChangeLog:1.2476
--- php-src/ChangeLog:1.2475Fri Oct  6 01:32:07 2006
+++ php-src/ChangeLog   Sat Oct  7 01:30:57 2006
@@ -1,3 +1,171 @@
+2006-10-06  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* ext/pdo_pgsql/config.m4
+  ext/pdo_pgsql/pgsql_driver.c:
+  MFB: Make quote() in PostgreSQL use PQescapeByteaConn() whenever possible
+  for binary strings.
+
+* (PHP_5_2)
+  ext/pdo_pgsql/config.m4
+  ext/pdo_pgsql/pgsql_driver.c:
+  Make quote() in PostgreSQL use PQescapeByteaConn() whenever possible for
+  binary strings.
+
+* ext/pgsql/config.m4
+  ext/pgsql/pgsql.c:
+  MFB: Make pg_escape_bytea() use PQescapeByteaConn() whenever possible.
+
+* (PHP_5_2)
+  ext/pgsql/config.m4
+  ext/pgsql/pgsql.c:
+  Make pg_escape_bytea() use PQescapeByteaConn() whenever possible.
+
+* (PHP_5_2)
+  NEWS
+  configure.in
+  main/php_version.h:
+  back to dev
+
+* ext/session/php_session.h
+  ext/session/session.c:
+  MFB: Expose session storage module locater and serialization function via
+  PHPAPI
+
+* (PHP_5_2)
+  ext/session/php_session.h
+  ext/session/session.c:
+  Expose session storage module locater and serialization function via 
PHPAPI
+
+* (PHP_5_2)
+  README.UPDATE_5_2:
+  modulo 0 news entry
+
+2006-10-06  Andrei Zmievski  [EMAIL PROTECTED]
+
+* ext/standard/type.c:
+  Unicode support in is_callable().
+
+* ext/standard/uniqid.c:
+  Unicode support in uniqid().
+
+* ext/standard/var.c:
+  Mark memory funcs with U.
+
+2006-10-06  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/reflection/php_reflection.c
+  ext/reflection/php_reflection.c
+  ext/reflection/tests/bug39067.phpt
+  ext/reflection/tests/bug39067.phpt:
+  more improvements
+
+2006-10-06  Andrei Zmievski  [EMAIL PROTECTED]
+
+* ext/standard/lcg.c:
+  Mark with U.
+
+* ext/standard/pageinfo.c:
+  Mark pageinfo.c funcs with U.
+
+* ext/standard/rand.c:
+  Mark rand.c functions with U.
+
+2006-10-06  Sara Golemon  [EMAIL PROTECTED]
+
+* ext/standard/streamsfuncs.c:
+  Forgot to mark these u-safe
+
+2006-10-06  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/reflection/php_reflection.c
+  ext/reflection/tests/bug39067.phpt:
+  MFH: fix #39067 (getDeclaringClass() and private properties)
+
+* ext/reflection/php_reflection.c
+  ext/reflection/tests/bug39067.phpt
+  ext/reflection/tests/bug39067.phpt:
+  fix #39067 (getDeclaringClass() and private properties)
+
+2006-10-06  Andrei Zmievski  [EMAIL PROTECTED]
+
+* ZendEngine2/zend_strtol.c:
+  Patch from Matt W to fix the case of hitting ERANGE too early.
+
+* ext/unicode/collator.c
+  ext/unicode/property.c:
+  Fix protos.
+
+* ZendEngine2/zend_builtin_functions.c:
+  Unicode string support for extension_loaded().
+
+* ZendEngine2/zend_builtin_functions.c:
+  Unicode string support in get_extension_funcs().
+
+2006-10-06  Sara Golemon  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ZendEngine2/zend.c:
+  MFH(r-1.376): Preserve EG(return_value_ptr_ptr) when calling
+  zend_execute_scripts()
+  
+  Reapplying this since it looks like we'll be doing a PHP 5.2 RC6 after 
all
+
+2006-10-06  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/standard/tests/strings/str_replace.phpt:
+  re-add the test
+
+* (PHP_5_2)
+  TSRM/tsrm_virtual_cwd.c:
+  MFH: fix #39060 (virtual_file_ex() is broken on *BSD)
+
+* TSRM/tsrm_virtual_cwd.c:
+  fix #39060 (virtual_file_ex() is broken on *BSD)
+
+2006-10-06  Edin Kadribasic  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS:
+  BFN
+
+2006-10-06  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/oci8/oci8_statement.c:
+  fix PECL bug #8816 (issue in php_oci_statement_fetch with more than one
+  piecewise column)
+  patch by jeff at badtz-maru dot com
+
+2006-10-06  Edin Kadribasic  [EMAIL PROTECTED]
+
+* ext/com_dotnet/com_handlers.c:
+  MFB: Fix for #38985  (Wez)
+
+* (PHP_5_2)
+  ext/com_dotnet/com_handlers.c:
+  Fix for #38985  (Wez)
+
+2006-10-06  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/oci8/tests/pecl_bug8816.phpt:
+  new test
+
+2006-10-06  Sebastian Bergmann  [EMAIL PROTECTED]
+
+* ext/curl/multi.c:
+  MFB: Fix ZTS build.
+
+* (PHP_5_2)
+  ext/curl/multi.c:
+  Fix ZTS build.
+
+2006-10-06  Sara Golemon  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ZendEngine2/zend.c:
+  Revert until 5.2's release since we're in RC stage
+
 2006-10-05  Sara Golemon  [EMAIL PROTECTED]
 
 * (PHP_4_4)


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

2006-10-06 Thread changelog
changelog   Sat Oct  7 01:31:00 2006 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/ChangeLog?r1=1.996r2=1.997diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.996 ZendEngine2/ChangeLog:1.997
--- ZendEngine2/ChangeLog:1.996 Fri Oct  6 01:32:17 2006
+++ ZendEngine2/ChangeLog   Sat Oct  7 01:30:59 2006
@@ -1,3 +1,27 @@
+2006-10-06  Andrei Zmievski  [EMAIL PROTECTED]
+
+* zend_strtol.c:
+  Patch from Matt W to fix the case of hitting ERANGE too early.
+
+* zend_builtin_functions.c:
+  Unicode string support for extension_loaded().
+
+* zend_builtin_functions.c:
+  Unicode string support in get_extension_funcs().
+
+2006-10-06  Sara Golemon  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  zend.c:
+  MFH(r-1.376): Preserve EG(return_value_ptr_ptr) when calling
+  zend_execute_scripts()
+  
+  Reapplying this since it looks like we'll be doing a PHP 5.2 RC6 after 
all
+
+* (PHP_5_2)
+  zend.c:
+  Revert until 5.2's release since we're in RC stage
+
 2006-10-05  Sara Golemon  [EMAIL PROTECTED]
 
 * (PHP_5_2)
@@ -15465,7 +15489,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.996 2006/10/06 01:32:17 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.997 2006/10/07 01:30:59 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -17189,7 +17213,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.996 2006/10/06 01:32:17 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.997 2006/10/07 01:30:59 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/curl multi.c

2006-10-06 Thread Antony Dovgal

On 06.10.2006 07:48, Sebastian Bergmann wrote:

sebastian   Fri Oct  6 03:48:00 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/curl	multi.c 
  Log:

  Fix ZTS build.


Thanks.

--
Wbr, 
Antony Dovgal


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



[PHP-CVS] cvs: php-src /ext/oci8/tests pecl_bug8816.phpt

2006-10-06 Thread Antony Dovgal
tony2001Fri Oct  6 09:57:29 2006 UTC

  Added files: 
/php-src/ext/oci8/tests pecl_bug8816.phpt 
  Log:
  new test
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/pecl_bug8816.phpt?view=markuprev=1.1
Index: php-src/ext/oci8/tests/pecl_bug8816.phpt
+++ php-src/ext/oci8/tests/pecl_bug8816.phpt
--TEST--
PECL Bug #8816 (issue in php_oci_statement_fetch with more than one piecewise 
column)
--SKIPIF--
?php if (!extension_loaded('oci8')) die(skip no oci8 extension); ?
--FILE--
?php

require dirname(__FILE__)./connect.inc;

$create_1 = CREATE TABLE t1 (id INTEGER, l1 LONG);
$create_2 = CREATE TABLE t2 (id INTEGER, l2 LONG);
$drop_1 = DROP TABLE t1;
$drop_2 = DROP TABLE t2;

$s1 = oci_parse($c, $drop_1);
$s2 = oci_parse($c, $drop_2);
@oci_execute($s1);
@oci_execute($s2);

$s1 = oci_parse($c, $create_1);
$s2 = oci_parse($c, $create_2);
oci_execute($s1);
oci_execute($s2);

$values = array(12345678901, 122, 
985456745674567654567654567654, 123456789, 987654321);

$i = 0;
foreach ($values as $val) {
$i++;
$insert = INSERT INTO t1 VALUES($i, .$val.);
$s = oci_parse($c, $insert);
oci_execute($s);
}

foreach ($values as $val) {
$insert = INSERT INTO t2 VALUES($i, .$val.);
$s = oci_parse($c, $insert);
oci_execute($s);
$i--;
}

$query =
SELECT
  t1.l1, t2.l2
FROM
t1, t2
WHERE 
t1.id = t2.id 
ORDER BY t1.id ASC
;

$sth = oci_parse($c, $query);
oci_execute($sth);

while ( $row = oci_fetch_assoc($sth) ) {
var_dump($row);
}

$s1 = oci_parse($c, $drop_1);
$s2 = oci_parse($c, $drop_2);
@oci_execute($s1);
@oci_execute($s2);

echo Done\n;

?
--EXPECT--
array(2) {
  [L1]=
  string(19) 12345678901
  [L2]=
  string(9) 987654321
}
array(2) {
  [L1]=
  string(15) 122
  [L2]=
  string(9) 123456789
}
array(2) {
  [L1]=
  string(30) 985456745674567654567654567654
  [L2]=
  string(30) 985456745674567654567654567654
}
array(2) {
  [L1]=
  string(9) 123456789
  [L2]=
  string(15) 122
}
array(2) {
  [L1]=
  string(9) 987654321
  [L2]=
  string(19) 12345678901
}
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/com_dotnet com_handlers.c

2006-10-06 Thread Edin Kadribasic
edink   Fri Oct  6 12:23:30 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/com_dotnet com_handlers.c 
  Log:
  Fix for #38985  (Wez)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/com_dotnet/com_handlers.c?r1=1.30.2.5.2.1r2=1.30.2.5.2.2diff_format=u
Index: php-src/ext/com_dotnet/com_handlers.c
diff -u php-src/ext/com_dotnet/com_handlers.c:1.30.2.5.2.1 
php-src/ext/com_dotnet/com_handlers.c:1.30.2.5.2.2
--- php-src/ext/com_dotnet/com_handlers.c:1.30.2.5.2.1  Wed May 10 14:39:10 2006
+++ php-src/ext/com_dotnet/com_handlers.c   Fri Oct  6 12:23:30 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: com_handlers.c,v 1.30.2.5.2.1 2006/05/10 14:39:10 rrichards Exp $ */
+/* $Id: com_handlers.c,v 1.30.2.5.2.2 2006/10/06 12:23:30 edink Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -537,7 +537,7 @@
return SUCCESS;
}
 
-   return FAILURE;
+   return zend_std_cast_object_tostring(readobj, writeobj, type TSRMLS_CC);
 }
 
 static int com_object_count(zval *object, long *count TSRMLS_DC)

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



[PHP-CVS] cvs: php-src /ext/oci8 oci8_statement.c

2006-10-06 Thread Antony Dovgal
tony2001Fri Oct  6 12:46:08 2006 UTC

  Modified files:  
/php-src/ext/oci8   oci8_statement.c 
  Log:
  fix PECL bug #8816 (issue in php_oci_statement_fetch with more than one 
piecewise column)
  patch by jeff at badtz-maru dot com
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.29r2=1.30diff_format=u
Index: php-src/ext/oci8/oci8_statement.c
diff -u php-src/ext/oci8/oci8_statement.c:1.29 
php-src/ext/oci8/oci8_statement.c:1.30
--- php-src/ext/oci8/oci8_statement.c:1.29  Tue Sep 12 11:42:25 2006
+++ php-src/ext/oci8/oci8_statement.c   Fri Oct  6 12:46:08 2006
@@ -25,7 +25,7 @@
+--+
 */
 
-/* $Id: oci8_statement.c,v 1.29 2006/09/12 11:42:25 tony2001 Exp $ */
+/* $Id: oci8_statement.c,v 1.30 2006/10/06 12:46:08 tony2001 Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
@@ -155,6 +155,11 @@
 int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows TSRMLS_DC)
 {
int i;
+   void *handlepp;
+   ub4 typep, iterp, idxp;
+   ub1 in_outp, piecep;
+   zend_bool piecewisecols = 0;
+
php_oci_out_column *column;
 
PHP_OCI_CALL_RETURN(statement-errcode, OCIStmtFetch, (statement-stmt, 
statement-err, nrows, OCI_FETCH_NEXT, OCI_DEFAULT));
@@ -186,42 +191,63 @@
column = php_oci_statement_get_column(statement, i + 1, NULL, 0 
TSRMLS_CC);
if (column-piecewise) {
column-retlen4 = 0;
+   piecewisecols = 1;
}
}

while (statement-errcode == OCI_NEED_DATA) {
-   for (i = 0; i  statement-ncolumns; i++) {
-   column = php_oci_statement_get_column(statement, i + 1, 
NULL, 0 TSRMLS_CC);
-   if (column-piecewise)  {
-   if (!column-data) {
-   column-data = (text *) 
emalloc(PHP_OCI_PIECE_SIZE);
-   } else {
-   column-data = erealloc(column-data, 
column-retlen4 + PHP_OCI_PIECE_SIZE);
-   }
-
-   column-cb_retlen = PHP_OCI_PIECE_SIZE;
+   if (piecewisecols) {
+   PHP_OCI_CALL_RETURN(statement-errcode,
+   OCIStmtGetPieceInfo, 
+  (
+   statement-stmt,
+   statement-err,
+   handlepp,
+   typep,
+   in_outp,
+   iterp,
+   idxp,
+   piecep
+  )
+   );
+
+   /* scan through our columns for a piecewise column with 
a matching handle */
+   for (i = 0; i  statement-ncolumns; i++) {
+   column = 
php_oci_statement_get_column(statement, i + 1, NULL, 0 TSRMLS_CC);
+   if (column-piecewise  handlepp == 
column-oci_define)   {
+   if (!column-data) {
+   column-data = (text *) 
ecalloc(1, PHP_OCI_PIECE_SIZE + 1);
+   } else {
+   column-data = 
erealloc(column-data, column-retlen4 + PHP_OCI_PIECE_SIZE + 1);
+   memset(column-data + 
column-retlen4, 0, PHP_OCI_PIECE_SIZE + 1);
+   }
+   column-cb_retlen = PHP_OCI_PIECE_SIZE;
 
-   PHP_OCI_CALL(OCIStmtSetPieceInfo, 
-   (
-(void *) column-oci_define,
-OCI_HTYPE_DEFINE,
-statement-err,
-((char*)column-data) + 
column-retlen4,
-(column-cb_retlen),
-OCI_NEXT_PIECE,
-column-indicator,
-column-retcode
-   )
-   );
+   /* and instruct fetch to fetch waiting 
piece into our buffer */
+   PHP_OCI_CALL(OCIStmtSetPieceInfo,
+  (
+   (void *) 
column-oci_define,
+   

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

2006-10-06 Thread Edin Kadribasic
edink   Fri Oct  6 12:53:15 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.290r2=1.2027.2.547.2.291diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.290 php-src/NEWS:1.2027.2.547.2.291
--- php-src/NEWS:1.2027.2.547.2.290 Thu Oct  5 19:49:03 2006
+++ php-src/NEWSFri Oct  6 12:53:15 2006
@@ -31,6 +31,7 @@
   session.save_path, allowing them to account for extra parameters). (Ilia)
 - Fixed bug #38989 (Absolute path with slash at beginning doesn't work on win).
   (Dmitry)
+- Fixed bug #38985 (Can't cast COM objects). (Wez)
 - Fixed bug #38981 (using FTP URLs in get_headers() causes crash). (Tony)
 - Fixed bug #38961 (metaphone() results in segmentation fault on NetBSD). 
   (Tony)

-- 
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/standard/tests/strings str_replace.phpt

2006-10-06 Thread Antony Dovgal
tony2001Fri Oct  6 14:50:46 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings str_replace.phpt 
  Log:
  re-add the test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_replace.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u
Index: php-src/ext/standard/tests/strings/str_replace.phpt
diff -u /dev/null php-src/ext/standard/tests/strings/str_replace.phpt:1.1.2.4
--- /dev/null   Fri Oct  6 14:50:46 2006
+++ php-src/ext/standard/tests/strings/str_replace.phpt Fri Oct  6 14:50:46 2006
@@ -0,0 +1,108 @@
+--TEST--
+str_replace() tests
+--FILE--
+?php
+
+var_dump(str_replace(, , ));
+
+var_dump(str_replace(e, b, test));
+
+var_dump(str_replace(, , , $count));
+var_dump($count);
+
+var_dump(str_replace(q, q, q, $count));
+var_dump($count);
+
+var_dump(str_replace(long string here, , , $count));
+var_dump($count);
+
+var_dump(str_replace(chr(0), a, , $count));
+var_dump($count);
+
+var_dump(str_replace(chr(0), a, chr(0), $count));
+var_dump($count);
+
+var_dump(str_replace(multi, a, aaa, $count));
+var_dump($count);
+
+var_dump(str_replace(a, multi, aaa, $count));
+var_dump($count);
+
+var_dump(str_replace(array(a, a, b), multi, aaa, $count));
+var_dump($count);
+
+var_dump(str_replace(array(a, a, b), array(q, q, c), aaa, 
$count));
+var_dump($count);
+
+var_dump(str_replace(array(a, a, b), array(q, q, c), array(aaa, 
bbb), $count));
+var_dump($count);
+
+var_dump(str_replace(a, array(q, q, c), array(aaa, bbb), $count));
+var_dump($count);
+
+var_dump(str_replace(a, 1, array(aaa, bbb), $count));
+var_dump($count);
+
+var_dump(str_replace(1, 3, array(aaa1, 2bbb), $count));
+var_dump($count);
+
+$fp = fopen(__FILE__, r);
+var_dump(str_replace($fp, $fp, $fp, $fp));
+var_dump($fp);
+
+echo Done\n;
+?
+--EXPECTF--
+string(0) 
+string(4) tbst
+string(0) 
+int(0)
+string(1) q
+int(1)
+string(0) 
+int(0)
+string(0) 
+int(0)
+string(1) a
+int(1)
+string(3) aaa
+int(0)
+string(15) multimultimulti
+int(3)
+string(15) multimultimulti
+int(3)
+string(3) qqq
+int(3)
+array(2) {
+  [0]=
+  string(3) qqq
+  [1]=
+  string(3) ccc
+}
+int(6)
+
+Notice: Array to string conversion in %s on line %d
+array(2) {
+  [0]=
+  string(15) ArrayArrayArray
+  [1]=
+  string(3) bbb
+}
+int(3)
+array(2) {
+  [0]=
+  string(3) 111
+  [1]=
+  string(3) bbb
+}
+int(3)
+array(2) {
+  [0]=
+  string(4) aaa3
+  [1]=
+  string(4) 2bbb
+}
+int(1)
+string(%d) Resource id #%d
+int(1)
+Done

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



[PHP-CVS] cvs: php-src /ext/unicode collator.c property.c

2006-10-06 Thread Andrei Zmievski
andrei  Fri Oct  6 17:14:14 2006 UTC

  Modified files:  
/php-src/ext/unicodecollator.c property.c 
  Log:
  Fix protos.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/unicode/collator.c?r1=1.10r2=1.11diff_format=u
Index: php-src/ext/unicode/collator.c
diff -u php-src/ext/unicode/collator.c:1.10 php-src/ext/unicode/collator.c:1.11
--- php-src/ext/unicode/collator.c:1.10 Fri Sep 22 19:50:02 2006
+++ php-src/ext/unicode/collator.c  Fri Oct  6 17:14:14 2006
@@ -14,7 +14,7 @@
+--+
 */
 
-/* $Id: collator.c,v 1.10 2006/09/22 19:50:02 andrei Exp $ */
+/* $Id: collator.c,v 1.11 2006/10/06 17:14:14 andrei Exp $ */
 
 #include php.h
 #include ext/standard/php_array.h
@@ -247,7 +247,7 @@
 }
 /* }}} */
 
-/* {{{ proto void Collator::set_strength(int strength) U
+/* {{{ proto void Collator::setStrength(int strength) U
Set the collation strength */
 /* {{{ proto void collator_set_strength(Collator coll, int strength) U
Set the collation strength */
@@ -265,7 +265,7 @@
 }
 /* }}} */
 
-/* {{{ proto int Collator::get_strength() U
+/* {{{ proto int Collator::getStrength() U
Returns the current collation strength */
 /* {{{ proto int collator_get_strength(Collator coll) U
Returns the current collation strength */
@@ -282,7 +282,7 @@
 }
 /* }}} */
 
-/* {{{ proto bool Collator::set_attribute(int attribute, int value) U
+/* {{{ proto bool Collator::setAttribute(int attribute, int value) U
Set a collation attribute */
 /* {{{ proto bool collator_set_attribute(Collator coll, int attribute, int 
value) U
Set a collation attribute */
@@ -304,7 +304,7 @@
 /* }}} */
 
 
-/* {{{ proto int Collator::get_attribute(int attribute) U
+/* {{{ proto int Collator::getAttribute(int attribute) U
Returns a collation attribute */
 /* {{{ proto int collator_get_attribute(Collator coll, int attribute) U
Returns a collation attribute */
http://cvs.php.net/viewvc.cgi/php-src/ext/unicode/property.c?r1=1.16r2=1.17diff_format=u
Index: php-src/ext/unicode/property.c
diff -u php-src/ext/unicode/property.c:1.16 php-src/ext/unicode/property.c:1.17
--- php-src/ext/unicode/property.c:1.16 Thu Sep 21 18:26:31 2006
+++ php-src/ext/unicode/property.c  Fri Oct  6 17:14:14 2006
@@ -14,7 +14,7 @@
+--+
  */
 
-/* $Id: property.c,v 1.16 2006/09/21 18:26:31 andrei Exp $ */ 
+/* $Id: property.c,v 1.17 2006/10/06 17:14:14 andrei Exp $ */ 
 
 #include php_unicode.h
 
@@ -253,7 +253,7 @@
 
 /* {{{ Single character properties */
 
-/* {{{ poto float char_get_numeric_value(char text) U
+/* {{{ proto float char_get_numeric_value(char text) U
Get the numeric value for the character, as defined in the Unicode 
Character Database */
 PHP_FUNCTION(char_get_numeric_value)
 {

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



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

2006-10-06 Thread Andrei Zmievski
andrei  Fri Oct  6 18:00:13 2006 UTC

  Modified files:  
/php-src/ext/standard   rand.c 
  Log:
  Mark rand.c functions with U.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/rand.c?r1=1.71r2=1.72diff_format=u
Index: php-src/ext/standard/rand.c
diff -u php-src/ext/standard/rand.c:1.71 php-src/ext/standard/rand.c:1.72
--- php-src/ext/standard/rand.c:1.71Sun Jan  1 13:09:55 2006
+++ php-src/ext/standard/rand.c Fri Oct  6 18:00:13 2006
@@ -20,7 +20,7 @@
| Based on code from: Shawn Cokus [EMAIL PROTECTED]  |
+--+
  */
-/* $Id: rand.c,v 1.71 2006/01/01 13:09:55 sniper Exp $ */
+/* $Id: rand.c,v 1.72 2006/10/06 18:00:13 andrei Exp $ */
 
 #include stdlib.h
 
@@ -252,7 +252,7 @@
 }
 /* }}} */
 
-/* {{{ proto void srand([int seed])
+/* {{{ proto void srand([int seed]) U
Seeds random number generator */
 PHP_FUNCTION(srand)
 {
@@ -268,7 +268,7 @@
 }
 /* }}} */
 
-/* {{{ proto void mt_srand([int seed])
+/* {{{ proto void mt_srand([int seed]) U
Seeds Mersenne Twister random number generator */
 PHP_FUNCTION(mt_srand)
 {
@@ -311,7 +311,7 @@
  * -RL
  */
 
-/* {{{ proto int rand([int min, int max])
+/* {{{ proto int rand([int min, int max]) U
Returns a random number */
 PHP_FUNCTION(rand)
 {
@@ -332,7 +332,7 @@
 }
 /* }}} */
 
-/* {{{ proto int mt_rand([int min, int max])
+/* {{{ proto int mt_rand([int min, int max]) U
Returns a random number from Mersenne Twister */
 PHP_FUNCTION(mt_rand)
 {
@@ -365,7 +365,7 @@
 }
 /* }}} */
 
-/* {{{ proto int getrandmax(void)
+/* {{{ proto int getrandmax(void) U
Returns the maximum value a random number can have */
 PHP_FUNCTION(getrandmax)
 {
@@ -377,7 +377,7 @@
 }
 /* }}} */
 
-/* {{{ proto int mt_getrandmax(void)
+/* {{{ proto int mt_getrandmax(void) U
Returns the maximum value a random number from Mersenne Twister can have */
 PHP_FUNCTION(mt_getrandmax)
 {

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



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

2006-10-06 Thread Andrei Zmievski
andrei  Fri Oct  6 18:01:20 2006 UTC

  Modified files:  
/php-src/ext/standard   pageinfo.c 
  Log:
  Mark pageinfo.c funcs with U.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/pageinfo.c?r1=1.42r2=1.43diff_format=u
Index: php-src/ext/standard/pageinfo.c
diff -u php-src/ext/standard/pageinfo.c:1.42 
php-src/ext/standard/pageinfo.c:1.43
--- php-src/ext/standard/pageinfo.c:1.42Sun Jan  1 13:09:55 2006
+++ php-src/ext/standard/pageinfo.c Fri Oct  6 18:01:20 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: pageinfo.c,v 1.42 2006/01/01 13:09:55 sniper Exp $ */
+/* $Id: pageinfo.c,v 1.43 2006/10/06 18:01:20 andrei Exp $ */
 
 #include php.h
 #include pageinfo.h
@@ -100,7 +100,7 @@
return (BG(page_gid));
 }
 
-/* {{{ proto int getmyuid(void)
+/* {{{ proto int getmyuid(void) U
Get PHP script owner's UID */
 PHP_FUNCTION(getmyuid)
 {
@@ -115,7 +115,7 @@
 }
 /* }}} */
 
-/* {{{ proto int getmygid(void)
+/* {{{ proto int getmygid(void) U
Get PHP script owner's GID */
 PHP_FUNCTION(getmygid)
 {
@@ -130,7 +130,7 @@
 }
 /* }}} */
 
-/* {{{ proto int getmypid(void)
+/* {{{ proto int getmypid(void) U
Get current process ID */
 PHP_FUNCTION(getmypid)
 {
@@ -145,7 +145,7 @@
 }
 /* }}} */
 
-/* {{{ proto int getmyinode(void)
+/* {{{ proto int getmyinode(void) U
Get the inode of the current script being parsed */
 PHP_FUNCTION(getmyinode)
 {
@@ -164,7 +164,7 @@
return BG(page_mtime);
 }
 
-/* {{{ proto int getlastmod(void)
+/* {{{ proto int getlastmod(void) U
Get time of last page modification */
 PHP_FUNCTION(getlastmod)
 {

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



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

2006-10-06 Thread Andrei Zmievski
andrei  Fri Oct  6 18:02:04 2006 UTC

  Modified files:  
/php-src/ext/standard   lcg.c 
  Log:
  Mark with U.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/lcg.c?r1=1.42r2=1.43diff_format=u
Index: php-src/ext/standard/lcg.c
diff -u php-src/ext/standard/lcg.c:1.42 php-src/ext/standard/lcg.c:1.43
--- php-src/ext/standard/lcg.c:1.42 Sun Jan  1 13:09:55 2006
+++ php-src/ext/standard/lcg.c  Fri Oct  6 18:02:04 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: lcg.c,v 1.42 2006/01/01 13:09:55 sniper Exp $ */
+/* $Id: lcg.c,v 1.43 2006/10/06 18:02:04 andrei Exp $ */
 
 #include php.h
 #include php_lcg.h
@@ -114,7 +114,7 @@
return SUCCESS;
 }
 
-/* {{{ proto float lcg_value()
+/* {{{ proto float lcg_value() U
Returns a value from the combined linear congruential generator */
 PHP_FUNCTION(lcg_value)
 {

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



[PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests bug39067.phpt

2006-10-06 Thread Antony Dovgal
tony2001Fri Oct  6 18:02:51 2006 UTC

  Modified files:  
/php-src/ext/reflection php_reflection.c 
/php-src/ext/reflection/tests   bug39067.phpt 
  Log:
  more improvements
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.259r2=1.260diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.259 
php-src/ext/reflection/php_reflection.c:1.260
--- php-src/ext/reflection/php_reflection.c:1.259   Fri Oct  6 17:34:56 2006
+++ php-src/ext/reflection/php_reflection.c Fri Oct  6 18:02:50 2006
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.259 2006/10/06 17:34:56 tony2001 Exp $ */
+/* $Id: php_reflection.c,v 1.260 2006/10/06 18:02:50 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -4099,12 +4099,12 @@
prop_name_len = USTR_LEN(prop_name);
ce = tmp_ce = ref-ce;
while (tmp_ce  zend_u_hash_find(tmp_ce-properties_info, 
UG(unicode)?IS_UNICODE:IS_STRING, prop_name, prop_name_len + 1, (void **) 
tmp_info) == SUCCESS) {
-   ce = tmp_ce;
-   tmp_ce = tmp_ce-parent;
if (tmp_info-flags  ZEND_ACC_PRIVATE) {
/* it's a private property, so it can't be inherited */
break;
}
+   ce = tmp_ce;
+   tmp_ce = tmp_ce-parent;
}
 
zend_reflection_class_factory(ce, return_value TSRMLS_CC);
@@ -4913,7 +4913,7 @@
php_info_print_table_start();
php_info_print_table_header(2, Reflection, enabled);
 
-   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.259 
2006/10/06 17:34:56 tony2001 Exp $);
+   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 1.260 
2006/10/06 18:02:50 tony2001 Exp $);
 
php_info_print_table_end();
 } /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug39067.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/reflection/tests/bug39067.phpt
diff -u php-src/ext/reflection/tests/bug39067.phpt:1.1 
php-src/ext/reflection/tests/bug39067.phpt:1.2
--- php-src/ext/reflection/tests/bug39067.phpt:1.1  Fri Oct  6 17:34:56 2006
+++ php-src/ext/reflection/tests/bug39067.phpt  Fri Oct  6 18:02:50 2006
@@ -24,15 +24,28 @@
 $rc = new ReflectionClass('A');
 var_dump($rc-getProperty('x')-getDeclaringClass()-getName());
 
+class Test {
+   private $x;
+}
+
+class Test2 extends Test {
+   public $x;
+}
+
+$rc = new ReflectionClass('Test2');
+var_dump($rc-getProperty('x')-getDeclaringClass()-getName());
+
 echo Done\n;
 ?
 --EXPECTF--
 string(1) C
 string(1) B
 string(1) A
+string(5) Test2
 Done
 --UEXPECTF--
 unicode(1) C
 unicode(1) B
 unicode(1) A
+unicode(4) Test2
 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/reflection php_reflection.c /ext/reflection/tests bug39067.phpt

2006-10-06 Thread Antony Dovgal
tony2001Fri Oct  6 18:03:19 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/reflection php_reflection.c 
/php-src/ext/reflection/tests   bug39067.phpt 
  Log:
  more improvements
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.28r2=1.164.2.33.2.29diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.28 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.29
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.28 Fri Oct  6 
17:35:32 2006
+++ php-src/ext/reflection/php_reflection.c Fri Oct  6 18:03:19 2006
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.28 2006/10/06 17:35:32 tony2001 Exp $ 
*/
+/* $Id: php_reflection.c,v 1.164.2.33.2.29 2006/10/06 18:03:19 tony2001 Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -4027,12 +4027,12 @@
prop_name_len = strlen(prop_name);
ce = tmp_ce = ref-ce;
while (tmp_ce  zend_hash_find(tmp_ce-properties_info, prop_name, 
prop_name_len + 1, (void **) tmp_info) == SUCCESS) {
-   ce = tmp_ce;
-   tmp_ce = tmp_ce-parent;
if (tmp_info-flags  ZEND_ACC_PRIVATE) {
/* it's a private property, so it can't be inherited */
break;
}
+   ce = tmp_ce;
+   tmp_ce = tmp_ce-parent;
}
 
zend_reflection_class_factory(ce, return_value TSRMLS_CC);
@@ -4844,7 +4844,7 @@
php_info_print_table_start();
php_info_print_table_header(2, Reflection, enabled);
 
-   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 
1.164.2.33.2.28 2006/10/06 17:35:32 tony2001 Exp $);
+   php_info_print_table_row(2, Version, $Id: php_reflection.c,v 
1.164.2.33.2.29 2006/10/06 18:03:19 tony2001 Exp $);
 
php_info_print_table_end();
 } /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug39067.phpt?r1=1.1.2.2r2=1.1.2.3diff_format=u
Index: php-src/ext/reflection/tests/bug39067.phpt
diff -u php-src/ext/reflection/tests/bug39067.phpt:1.1.2.2 
php-src/ext/reflection/tests/bug39067.phpt:1.1.2.3
--- php-src/ext/reflection/tests/bug39067.phpt:1.1.2.2  Fri Oct  6 17:35:32 2006
+++ php-src/ext/reflection/tests/bug39067.phpt  Fri Oct  6 18:03:19 2006
@@ -24,10 +24,22 @@
 $rc = new ReflectionClass('A');
 var_dump($rc-getProperty('x')-getDeclaringClass()-getName());
 
+class Test {
+   private $x;
+}
+
+class Test2 extends Test {
+   public $x;
+}
+
+$rc = new ReflectionClass('Test2');
+var_dump($rc-getProperty('x')-getDeclaringClass()-getName());
+
 echo Done\n;
 ?
 --EXPECTF--
 string(1) C
 string(1) B
 string(1) A
+string(5) Test2
 Done

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



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

2006-10-06 Thread Andrei Zmievski
andrei  Fri Oct  6 18:03:41 2006 UTC

  Modified files:  
/php-src/ext/standard   var.c 
  Log:
  Mark memory funcs with U.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var.c?r1=1.244r2=1.245diff_format=u
Index: php-src/ext/standard/var.c
diff -u php-src/ext/standard/var.c:1.244 php-src/ext/standard/var.c:1.245
--- php-src/ext/standard/var.c:1.244Tue Aug  8 16:59:11 2006
+++ php-src/ext/standard/var.c  Fri Oct  6 18:03:41 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: var.c,v 1.244 2006/08/08 16:59:11 tony2001 Exp $ */
+/* $Id: var.c,v 1.245 2006/10/06 18:03:41 andrei Exp $ */
 
 
 
@@ -1149,7 +1149,7 @@
 /* }}} */
 
 #if MEMORY_LIMIT
-/* {{{ proto int memory_get_usage([real_usage])
+/* {{{ proto int memory_get_usage([real_usage]) U
 Returns the allocated by PHP memory */
 PHP_FUNCTION(memory_get_usage) {
zend_bool real_usage = 0;
@@ -1161,7 +1161,7 @@
RETURN_LONG(zend_memory_usage(real_usage TSRMLS_CC));
 }
 /* }}} */
-/* {{{ proto int memory_get_peak_usage([real_usage])
+/* {{{ proto int memory_get_peak_usage([real_usage]) U
 Returns the peak allocated by PHP memory */
 PHP_FUNCTION(memory_get_peak_usage) {
zend_bool real_usage = 0;

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



Re: [PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests bug39067.phpt

2006-10-06 Thread Andrei Zmievski
Any idea if ext/reflection is Unicode-ready or how much work it needs  
to get there?


-Andrei

On Oct 6, 2006, at 11:02 AM, Antony Dovgal wrote:


tony2001Fri Oct  6 18:02:51 2006 UTC

  Modified files:
/php-src/ext/reflection php_reflection.c
/php-src/ext/reflection/tests   bug39067.phpt
  Log:
  more improvements


http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c? 
r1=1.259r2=1.260diff_format=u

Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.259  
php-src/ext/reflection/php_reflection.c:1.260
--- php-src/ext/reflection/php_reflection.c:1.259	Fri Oct  6 17:34:56  
2006

+++ php-src/ext/reflection/php_reflection.c Fri Oct  6 18:02:50 2006
@@ -20,7 +20,7 @@
 
+-- 
+

 */

-/* $Id: php_reflection.c,v 1.259 2006/10/06 17:34:56 tony2001 Exp $ */
+/* $Id: php_reflection.c,v 1.260 2006/10/06 18:02:50 tony2001 Exp $ */

 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -4099,12 +4099,12 @@
prop_name_len = USTR_LEN(prop_name);
ce = tmp_ce = ref-ce;
 	while (tmp_ce  zend_u_hash_find(tmp_ce-properties_info,  
UG(unicode)?IS_UNICODE:IS_STRING, prop_name, prop_name_len + 1, (void  
**) tmp_info) == SUCCESS) {

-   ce = tmp_ce;
-   tmp_ce = tmp_ce-parent;
if (tmp_info-flags  ZEND_ACC_PRIVATE) {
/* it's a private property, so it can't be inherited */
break;
}
+   ce = tmp_ce;
+   tmp_ce = tmp_ce-parent;
}

zend_reflection_class_factory(ce, return_value TSRMLS_CC);
@@ -4913,7 +4913,7 @@
php_info_print_table_start();
php_info_print_table_header(2, Reflection, enabled);

-	php_info_print_table_row(2, Version, $Id: php_reflection.c,v  
1.259 2006/10/06 17:34:56 tony2001 Exp $);
+	php_info_print_table_row(2, Version, $Id: php_reflection.c,v  
1.260 2006/10/06 18:02:50 tony2001 Exp $);


php_info_print_table_end();
 } /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/ 
bug39067.phpt?r1=1.1r2=1.2diff_format=u

Index: php-src/ext/reflection/tests/bug39067.phpt
diff -u php-src/ext/reflection/tests/bug39067.phpt:1.1  
php-src/ext/reflection/tests/bug39067.phpt:1.2
--- php-src/ext/reflection/tests/bug39067.phpt:1.1	Fri Oct  6 17:34:56  
2006

+++ php-src/ext/reflection/tests/bug39067.phpt  Fri Oct  6 18:02:50 2006
@@ -24,15 +24,28 @@
 $rc = new ReflectionClass('A');
 var_dump($rc-getProperty('x')-getDeclaringClass()-getName());

+class Test {
+   private $x;
+}
+
+class Test2 extends Test {
+   public $x;
+}
+
+$rc = new ReflectionClass('Test2');
+var_dump($rc-getProperty('x')-getDeclaringClass()-getName());
+
 echo Done\n;
 ?
 --EXPECTF--
 string(1) C
 string(1) B
 string(1) A
+string(5) Test2
 Done
 --UEXPECTF--
 unicode(1) C
 unicode(1) B
 unicode(1) A
+unicode(4) Test2
 Done

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


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



Re: [PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests bug39067.phpt

2006-10-06 Thread Antony Dovgal

On 10/06/2006 10:14 PM, Andrei Zmievski wrote:
Any idea if ext/reflection is Unicode-ready or how much work it needs  
to get there?


I don't think it should be something complex, but no it's not ready yet.

--
Wbr, 
Antony Dovgal


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



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

2006-10-06 Thread Andrei Zmievski
andrei  Fri Oct  6 20:00:37 2006 UTC

  Modified files:  
/php-src/ext/standard   uniqid.c 
  Log:
  Unicode support in uniqid().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/uniqid.c?r1=1.45r2=1.46diff_format=u
Index: php-src/ext/standard/uniqid.c
diff -u php-src/ext/standard/uniqid.c:1.45 php-src/ext/standard/uniqid.c:1.46
--- php-src/ext/standard/uniqid.c:1.45  Thu Apr  6 20:05:43 2006
+++ php-src/ext/standard/uniqid.c   Fri Oct  6 20:00:37 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: uniqid.c,v 1.45 2006/04/06 20:05:43 pollita Exp $ */
+/* $Id: uniqid.c,v 1.46 2006/10/06 20:00:37 andrei Exp $ */
 
 #include php.h
 
@@ -38,23 +38,26 @@
 #include php_lcg.h
 #include uniqid.h
 
-/* {{{ proto string uniqid([string prefix , bool more_entropy])
+/* {{{ proto string uniqid([string prefix , bool more_entropy]) U
Generates a unique ID */
 #ifdef HAVE_GETTIMEOFDAY
 PHP_FUNCTION(uniqid)
 {
-   char *prefix = ;
+   zstr prefix = EMPTY_ZSTR;
+   int prefix_len = 0;
+   zend_uchar str_type;
 #if defined(__CYGWIN__)
zend_bool more_entropy = 1;
 #else
zend_bool more_entropy = 0;
 #endif
char *uniqid;
-   int sec, usec, prefix_len = 0;
+   UChar *u_uniqid;
+   int sec, usec;
struct timeval tv;
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |sb, prefix, 
prefix_len,
- more_entropy)) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |tb, prefix,
+ prefix_len, 
str_type, more_entropy) == FAILURE) {
return;
}
 
@@ -75,13 +78,28 @@
/* The max value usec can have is 0xF423F, so we use only five hex
 * digits for usecs.
 */
-   if (more_entropy) {
-   spprintf(uniqid, 0, %s%08x%05x%.8f, prefix, sec, usec, 
php_combined_lcg(TSRMLS_C) * 10);
+   if (str_type == IS_UNICODE) {
+   /* prefix + 8 (sec) + 5 (usec) + 10 (lcg) */
+   int buf_len = prefix_len + 8 + 5 + 10 + 1;
+   int written;
+
+   u_uniqid = eumalloc(buf_len + 1);
+   if (more_entropy) {
+   written = u_sprintf(u_uniqid, %S%08x%05x%.8f, 
prefix.u, sec, usec, php_combined_lcg(TSRMLS_C) * 10);
+   } else {
+   written = u_sprintf(u_uniqid, %S%08x%05x, prefix.u, 
sec, usec);
+   }
+   u_uniqid[written] = 0;
+   RETURN_UNICODEL(u_uniqid, written, 0);
} else {
-   spprintf(uniqid, 0, %s%08x%05x, prefix, sec, usec);
-   }
+   if (more_entropy) {
+   spprintf(uniqid, 0, %s%08x%05x%.8f, prefix.s, sec, 
usec, php_combined_lcg(TSRMLS_C) * 10);
+   } else {
+   spprintf(uniqid, 0, %s%08x%05x, prefix.s, sec, usec);
+   }
 
-   RETURN_RT_STRING(uniqid, ZSTR_AUTOFREE);
+   RETURN_STRING(uniqid, 0);
+   }
 }
 #endif
 /* }}} */

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



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

2006-10-06 Thread Andrei Zmievski
andrei  Fri Oct  6 20:11:25 2006 UTC

  Modified files:  
/php-src/ext/standard   type.c 
  Log:
  Unicode support in is_callable().
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/type.c?r1=1.44r2=1.45diff_format=u
Index: php-src/ext/standard/type.c
diff -u php-src/ext/standard/type.c:1.44 php-src/ext/standard/type.c:1.45
--- php-src/ext/standard/type.c:1.44Mon Sep 25 01:37:55 2006
+++ php-src/ext/standard/type.c Fri Oct  6 20:11:25 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: type.c,v 1.44 2006/09/25 01:37:55 pollita Exp $ */
+/* $Id: type.c,v 1.45 2006/10/06 20:11:25 andrei Exp $ */
 
 #include php.h
 #include php_incomplete_class.h
@@ -441,31 +441,25 @@
 }
 /* }}} */
 
-/* {{{ proto bool is_callable(mixed var [, bool syntax_only [, string 
callable_name]]) 
+/* {{{ proto bool is_callable(mixed var [, bool syntax_only [, string 
callable_name]])  U
Returns true if var is callable. */
 PHP_FUNCTION(is_callable)
 {
-   zval **var, **syntax_only, **callable_name;
+   zval *var, **callable_name;
zval name;
zend_bool retval;
-   zend_bool syntax = 0;
-   int argc=ZEND_NUM_ARGS();
+   zend_bool syntax_only = 0;
 
-   if (argc  1 || argc  3 || zend_get_parameters_ex(argc, var, 
syntax_only, callable_name) == FAILURE) {
-   WRONG_PARAM_COUNT;
-   }
-
-   if (argc  1) {
-   convert_to_boolean_ex(syntax_only);
-   syntax = Z_BVAL_PP(syntax_only);
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, z|bZ, var,
+ syntax_only, 
callable_name) == FAILURE) {
+   return;
}
 
-   if (argc  2) {
-   retval = zend_is_callable(*var, syntax, name);
-   zval_dtor(*callable_name);
-   **callable_name = name;
+   if (ZEND_NUM_ARGS()  2) {
+   retval = zend_is_callable(var, syntax_only, name);
+   REPLACE_ZVAL_VALUE(callable_name, name, 0);
} else {
-   retval = zend_is_callable(*var, syntax, NULL);
+   retval = zend_is_callable(var, syntax_only, NULL);
}
 
RETURN_BOOL(retval);

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



Re: [PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests bug39067.phpt

2006-10-06 Thread Johannes Schlüter

Hi Andrei,

most parts off it work in unicode mode, there are a few places which 
need little work, see Dmitry's FIXME: Unicode support comments to get 
an idea. Basically I'm in writing tests and writing a patch but 
currently have less time than expected...


johannes

Andrei Zmievski wrote:
Any idea if ext/reflection is Unicode-ready or how much work it needs to 
get there?


-Andrei

On Oct 6, 2006, at 11:02 AM, Antony Dovgal wrote:


tony2001Fri Oct  6 18:02:51 2006 UTC

  Modified files:
/php-src/ext/reflectionphp_reflection.c
/php-src/ext/reflection/testsbug39067.phpt
  Log:
  more improvements


http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.259r2=1.260diff_format=u 


Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.259 
php-src/ext/reflection/php_reflection.c:1.260
--- php-src/ext/reflection/php_reflection.c:1.259Fri Oct  6 
17:34:56 2006

+++ php-src/ext/reflection/php_reflection.cFri Oct  6 18:02:50 2006
@@ -20,7 +20,7 @@

+--+

 */

-/* $Id: php_reflection.c,v 1.259 2006/10/06 17:34:56 tony2001 Exp $ */
+/* $Id: php_reflection.c,v 1.260 2006/10/06 18:02:50 tony2001 Exp $ */

 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -4099,12 +4099,12 @@
 prop_name_len = USTR_LEN(prop_name);
 ce = tmp_ce = ref-ce;
 while (tmp_ce  zend_u_hash_find(tmp_ce-properties_info, 
UG(unicode)?IS_UNICODE:IS_STRING, prop_name, prop_name_len + 1, (void 
**) tmp_info) == SUCCESS) {

-ce = tmp_ce;
-tmp_ce = tmp_ce-parent;
 if (tmp_info-flags  ZEND_ACC_PRIVATE) {
 /* it's a private property, so it can't be inherited */
 break;
 }
+ce = tmp_ce;
+tmp_ce = tmp_ce-parent;
 }

 zend_reflection_class_factory(ce, return_value TSRMLS_CC);
@@ -4913,7 +4913,7 @@
 php_info_print_table_start();
 php_info_print_table_header(2, Reflection, enabled);

-php_info_print_table_row(2, Version, $Id: php_reflection.c,v 
1.259 2006/10/06 17:34:56 tony2001 Exp $);
+php_info_print_table_row(2, Version, $Id: php_reflection.c,v 
1.260 2006/10/06 18:02:50 tony2001 Exp $);


 php_info_print_table_end();
 } /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug39067.phpt?r1=1.1r2=1.2diff_format=u 


Index: php-src/ext/reflection/tests/bug39067.phpt
diff -u php-src/ext/reflection/tests/bug39067.phpt:1.1 
php-src/ext/reflection/tests/bug39067.phpt:1.2
--- php-src/ext/reflection/tests/bug39067.phpt:1.1Fri Oct  6 
17:34:56 2006
+++ php-src/ext/reflection/tests/bug39067.phptFri Oct  6 18:02:50 
2006

@@ -24,15 +24,28 @@
 $rc = new ReflectionClass('A');
 var_dump($rc-getProperty('x')-getDeclaringClass()-getName());

+class Test {
+private $x;
+}
+
+class Test2 extends Test {
+public $x;
+}
+
+$rc = new ReflectionClass('Test2');
+var_dump($rc-getProperty('x')-getDeclaringClass()-getName());
+
 echo Done\n;
 ?
 --EXPECTF--   
 string(1) C

 string(1) B
 string(1) A
+string(5) Test2
 Done
 --UEXPECTF--
 unicode(1) C
 unicode(1) B
 unicode(1) A
+unicode(4) Test2
 Done

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


--
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) / README.UPDATE_5_2

2006-10-06 Thread Ilia Alshanetsky
iliaa   Fri Oct  6 21:03:35 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcREADME.UPDATE_5_2 
  Log:
  modulo 0 news entry
  
  
http://cvs.php.net/viewvc.cgi/php-src/README.UPDATE_5_2?r1=1.1.2.15r2=1.1.2.16diff_format=u
Index: php-src/README.UPDATE_5_2
diff -u php-src/README.UPDATE_5_2:1.1.2.15 php-src/README.UPDATE_5_2:1.1.2.16
--- php-src/README.UPDATE_5_2:1.1.2.15  Mon Sep 11 23:11:18 2006
+++ php-src/README.UPDATE_5_2   Fri Oct  6 21:03:35 2006
@@ -168,3 +168,11 @@
   unpredictable behavior due to an un-expected configuration file being
   read. This functionality was removed in 5.2 and PHP will no longer search
   CWD for the presence of the php.ini or the php-cli.ini files.
+
+- Added a notice when performing modulus 0 operation (Tony)
+
+  In earlier versions of PHP performing integer % 0 did not emit any 
+  warning messages, instead retuning an un-expected return value of false.
+  As of PHP 5.2 this operation will emit E_WARNING as is the case in all
+  other instance where division by zero is performed.
+ 
\ No newline at end of file

-- 
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/session php_session.h session.c

2006-10-06 Thread Ilia Alshanetsky
iliaa   Fri Oct  6 21:11:36 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/sessionsession.c php_session.h 
  Log:
  Expose session storage module locater and serialization function via PHPAPI
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.15r2=1.417.2.8.2.16diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.15 
php-src/ext/session/session.c:1.417.2.8.2.16
--- php-src/ext/session/session.c:1.417.2.8.2.15Sun Oct  1 20:58:02 2006
+++ php-src/ext/session/session.c   Fri Oct  6 21:11:36 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.15 2006/10/01 20:58:02 iliaa Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.16 2006/10/06 21:11:36 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -84,9 +84,6 @@
 PHPAPI ZEND_DECLARE_MODULE_GLOBALS(ps);
 static PHP_GINIT_FUNCTION(ps);
 
-static ps_module *_php_find_ps_module(char *name TSRMLS_DC);
-static const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC);
-
 #define SESSION_CHECK_ACTIVE_STATE \
if (PS(session_status) == php_session_active) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, A session is 
active. You cannot change the session module's ini settings at this time.);  \
@@ -1104,7 +1101,7 @@
sapi_add_header_ex(ncookie.c, ncookie.len, 0, 0 TSRMLS_CC);
 }
 
-static ps_module *_php_find_ps_module(char *name TSRMLS_DC)
+PHPAPI ps_module *_php_find_ps_module(char *name TSRMLS_DC)
 {
ps_module *ret = NULL;
ps_module **mod;
@@ -1119,7 +1116,7 @@
return ret;
 }
 
-static const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC)
+PHPAPI const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC)
 {
const ps_serializer *ret = NULL;
const ps_serializer *mod;
http://cvs.php.net/viewvc.cgi/php-src/ext/session/php_session.h?r1=1.101.2.2.2.2r2=1.101.2.2.2.3diff_format=u
Index: php-src/ext/session/php_session.h
diff -u php-src/ext/session/php_session.h:1.101.2.2.2.2 
php-src/ext/session/php_session.h:1.101.2.2.2.3
--- php-src/ext/session/php_session.h:1.101.2.2.2.2 Thu Aug 10 13:50:56 2006
+++ php-src/ext/session/php_session.h   Fri Oct  6 21:11:36 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_session.h,v 1.101.2.2.2.2 2006/08/10 13:50:56 iliaa Exp $ */
+/* $Id: php_session.h,v 1.101.2.2.2.3 2006/10/06 21:11:36 iliaa Exp $ */
 
 #ifndef PHP_SESSION_H
 #define PHP_SESSION_H
@@ -199,6 +199,9 @@
 PHPAPI void php_session_set_id(char *id TSRMLS_DC);
 PHPAPI void php_session_start(TSRMLS_D);
 
+PHPAPI ps_module *_php_find_ps_module(char *name TSRMLS_DC);
+PHPAPI const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC);
+
 #define PS_ADD_VARL(name,namelen) do { 
\
php_add_session_var(name, namelen TSRMLS_CC);   
\
 } while (0)

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



[PHP-CVS] cvs: php-src /ext/session php_session.h session.c

2006-10-06 Thread Ilia Alshanetsky
iliaa   Fri Oct  6 21:11:57 2006 UTC

  Modified files:  
/php-src/ext/sessionsession.c php_session.h 
  Log:
  MFB: Expose session storage module locater and serialization function via
  PHPAPI
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.452r2=1.453diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.452 php-src/ext/session/session.c:1.453
--- php-src/ext/session/session.c:1.452 Sun Oct  1 21:00:00 2006
+++ php-src/ext/session/session.c   Fri Oct  6 21:11:57 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.452 2006/10/01 21:00:00 iliaa Exp $ */
+/* $Id: session.c,v 1.453 2006/10/06 21:11:57 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -81,9 +81,6 @@
 PHPAPI ZEND_DECLARE_MODULE_GLOBALS(ps);
 static PHP_GINIT_FUNCTION(ps);
 
-static ps_module *_php_find_ps_module(char *name TSRMLS_DC);
-static const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC);
-
 #define SESSION_CHECK_ACTIVE_STATE \
if (PS(session_status) == php_session_active) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, A session is 
active. You cannot change the session module's ini settings at this time.);  \
@@ -992,7 +989,7 @@
sapi_add_header_ex(ncookie.c, ncookie.len, 0, 0 TSRMLS_CC);
 }
 
-static ps_module *_php_find_ps_module(char *name TSRMLS_DC)
+PHPAPI ps_module *_php_find_ps_module(char *name TSRMLS_DC)
 {
ps_module *ret = NULL;
ps_module **mod;
@@ -1007,7 +1004,7 @@
return ret;
 }
 
-static const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC)
+PHPAPI const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC)
 {
const ps_serializer *ret = NULL;
const ps_serializer *mod;
http://cvs.php.net/viewvc.cgi/php-src/ext/session/php_session.h?r1=1.108r2=1.109diff_format=u
Index: php-src/ext/session/php_session.h
diff -u php-src/ext/session/php_session.h:1.108 
php-src/ext/session/php_session.h:1.109
--- php-src/ext/session/php_session.h:1.108 Thu Aug 10 13:56:54 2006
+++ php-src/ext/session/php_session.h   Fri Oct  6 21:11:57 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_session.h,v 1.108 2006/08/10 13:56:54 iliaa Exp $ */
+/* $Id: php_session.h,v 1.109 2006/10/06 21:11:57 iliaa Exp $ */
 
 #ifndef PHP_SESSION_H
 #define PHP_SESSION_H
@@ -194,6 +194,9 @@
 PHPAPI void php_session_set_id(char *id TSRMLS_DC);
 PHPAPI void php_session_start(TSRMLS_D);
 
+PHPAPI ps_module *_php_find_ps_module(char *name TSRMLS_DC);
+PHPAPI const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC);
+
 #define PS_ADD_VARL(name,namelen) do { 
\
php_add_session_var(name, namelen TSRMLS_CC);   
\
 } while (0)

-- 
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 configure.in /main php_version.h

2006-10-06 Thread Ilia Alshanetsky
iliaa   Fri Oct  6 21:36:08 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS configure.in 
/php-src/main   php_version.h 
  Log:
  back to dev
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.291r2=1.2027.2.547.2.292diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.291 php-src/NEWS:1.2027.2.547.2.292
--- php-src/NEWS:1.2027.2.547.2.291 Fri Oct  6 12:53:15 2006
+++ php-src/NEWSFri Oct  6 21:36:07 2006
@@ -1,5 +1,7 @@
 PHPNEWS
 |||
+12 Oct 2006, PHP 5.2.0RC6
+
 05 Oct 2006, PHP 5.2.0RC5
 - Updated bundled OpenSSL to version 0.9.8d in the Windows distro. (Edin)
 - Updated Postgresql client libraries to 8.1.4 in the Windows distro. (Edin)
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.20r2=1.579.2.52.2.21diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.52.2.20 
php-src/configure.in:1.579.2.52.2.21
--- php-src/configure.in:1.579.2.52.2.20Thu Oct  5 19:49:03 2006
+++ php-src/configure.inFri Oct  6 21:36:07 2006
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579.2.52.2.20 2006/10/05 19:49:03 iliaa Exp $ -*- 
autoconf -*-
+ ## $Id: configure.in,v 1.579.2.52.2.21 2006/10/06 21:36:07 iliaa Exp $ -*- 
autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -44,7 +44,7 @@
 MAJOR_VERSION=5
 MINOR_VERSION=2
 RELEASE_VERSION=0
-EXTRA_VERSION=RC5
+EXTRA_VERSION=RC6-dev
 PHP_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION
 PHP_VERSION_ID=`expr [$]MAJOR_VERSION \* 1 + [$]MINOR_VERSION \* 100 + 
[$]RELEASE_VERSION`
 
http://cvs.php.net/viewvc.cgi/php-src/main/php_version.h?r1=1.112.2.37.2.11r2=1.112.2.37.2.12diff_format=u
Index: php-src/main/php_version.h
diff -u php-src/main/php_version.h:1.112.2.37.2.11 
php-src/main/php_version.h:1.112.2.37.2.12
--- php-src/main/php_version.h:1.112.2.37.2.11  Thu Oct  5 19:49:03 2006
+++ php-src/main/php_version.h  Fri Oct  6 21:36:07 2006
@@ -3,6 +3,6 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 2
 #define PHP_RELEASE_VERSION 0
-#define PHP_EXTRA_VERSION RC5
-#define PHP_VERSION 5.2.0RC5
+#define PHP_EXTRA_VERSION RC6-dev
+#define PHP_VERSION 5.2.0RC6-dev
 #define PHP_VERSION_ID 50200

-- 
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_pgsql config.m4 pgsql_driver.c

2006-10-06 Thread Ilia Alshanetsky
iliaa   Fri Oct  6 22:34:16 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/pdo_pgsql  config.m4 pgsql_driver.c 
  Log:
  Make quote() in PostgreSQL use PQescapeByteaConn() whenever possible for
  binary strings.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/config.m4?r1=1.13.4.1r2=1.13.4.2diff_format=u
Index: php-src/ext/pdo_pgsql/config.m4
diff -u php-src/ext/pdo_pgsql/config.m4:1.13.4.1 
php-src/ext/pdo_pgsql/config.m4:1.13.4.2
--- php-src/ext/pdo_pgsql/config.m4:1.13.4.1Wed Oct  4 23:53:36 2006
+++ php-src/ext/pdo_pgsql/config.m4 Fri Oct  6 22:34:16 2006
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.13.4.1 2006/10/04 23:53:36 iliaa Exp $
+dnl $Id: config.m4,v 1.13.4.2 2006/10/06 22:34:16 iliaa Exp $
 dnl
 
 if test $PHP_PDO != no; then
@@ -83,6 +83,7 @@
   LDFLAGS=$LDFLAGS -L$PGSQL_LIBDIR
   AC_CHECK_LIB(pq, PQescapeString,AC_DEFINE(HAVE_PQESCAPE,1,[PostgreSQL 7.2.0 
or later]))
   AC_CHECK_LIB(pq, PQescapeStringConn, 
AC_DEFINE(HAVE_PQESCAPE_CONN,1,[PostgreSQL 8.1.4 or later]))
+  AC_CHECK_LIB(pq, PQescapeByteaConn, 
AC_DEFINE(HAVE_PQESCAPE_BYTEA_CONN,1,[PostgreSQL 8.1.4 or later]))
   AC_CHECK_LIB(pq, 
PQsetnonblocking,AC_DEFINE(HAVE_PQSETNONBLOCKING,1,[PostgreSQL 7.0.x or later]))
   AC_CHECK_LIB(pq, PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES,1,[Broken libpq 
under windows]))
   AC_CHECK_LIB(pq, PQoidValue,AC_DEFINE(HAVE_PQOIDVALUE,1,[Older PostgreSQL]))
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.53.2.14.2.3r2=1.53.2.14.2.4diff_format=u
Index: php-src/ext/pdo_pgsql/pgsql_driver.c
diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.3 
php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.4
--- php-src/ext/pdo_pgsql/pgsql_driver.c:1.53.2.14.2.3  Wed Oct  4 23:53:36 2006
+++ php-src/ext/pdo_pgsql/pgsql_driver.cFri Oct  6 22:34:16 2006
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pgsql_driver.c,v 1.53.2.14.2.3 2006/10/04 23:53:36 iliaa Exp $ */
+/* $Id: pgsql_driver.c,v 1.53.2.14.2.4 2006/10/06 22:34:16 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -309,11 +309,16 @@
 static int pgsql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int 
unquotedlen, char **quoted, int *quotedlen, enum pdo_param_type paramtype 
TSRMLS_DC)
 {
unsigned char *escaped;
+   pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh-driver_data;

switch (paramtype) {
case PDO_PARAM_LOB:
/* escapedlen returned by PQescapeBytea() accounts for 
trailing 0 */
+#ifdef HAVE_PQESCAPE_BYTEA_CONN
+   escaped = PQescapeByteaConn(H-server, unquoted, 
unquotedlen, quotedlen);
+#else
escaped = PQescapeBytea(unquoted, unquotedlen, 
quotedlen);
+#endif
*quotedlen += 1;
*quoted = emalloc(*quotedlen + 1);
memcpy((*quoted)+1, escaped, *quotedlen-2);
@@ -322,9 +327,7 @@
(*quoted)[*quotedlen] = '\0';
free(escaped);
break;
-   default: {
-   pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle 
*)dbh-driver_data;
-
+   default:
*quoted = safe_emalloc(2, unquotedlen, 3);
(*quoted)[0] = '\'';
 #ifndef HAVE_PQESCAPE_CONN
@@ -335,7 +338,6 @@
(*quoted)[*quotedlen + 1] = '\'';
(*quoted)[*quotedlen + 2] = '\0';
*quotedlen += 2;
-   }
}
return 1;
 }

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



[PHP-CVS] cvs: php-src /ext/pdo_pgsql config.m4 pgsql_driver.c

2006-10-06 Thread Ilia Alshanetsky
iliaa   Fri Oct  6 22:34:29 2006 UTC

  Modified files:  
/php-src/ext/pdo_pgsql  config.m4 pgsql_driver.c 
  Log:
  MFB: Make quote() in PostgreSQL use PQescapeByteaConn() whenever possible
  for binary strings.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/config.m4?r1=1.14r2=1.15diff_format=u
Index: php-src/ext/pdo_pgsql/config.m4
diff -u php-src/ext/pdo_pgsql/config.m4:1.14 
php-src/ext/pdo_pgsql/config.m4:1.15
--- php-src/ext/pdo_pgsql/config.m4:1.14Wed Oct  4 23:53:54 2006
+++ php-src/ext/pdo_pgsql/config.m4 Fri Oct  6 22:34:29 2006
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.14 2006/10/04 23:53:54 iliaa Exp $
+dnl $Id: config.m4,v 1.15 2006/10/06 22:34:29 iliaa Exp $
 dnl
 
 if test $PHP_PDO != no; then
@@ -83,6 +83,7 @@
   LDFLAGS=$LDFLAGS -L$PGSQL_LIBDIR
   AC_CHECK_LIB(pq, PQescapeString,AC_DEFINE(HAVE_PQESCAPE,1,[PostgreSQL 7.2.0 
or later]))
   AC_CHECK_LIB(pq, PQescapeStringConn, 
AC_DEFINE(HAVE_PQESCAPE_CONN,1,[PostgreSQL 8.1.4 or later]))
+  AC_CHECK_LIB(pq, PQescapeByteaConn, 
AC_DEFINE(HAVE_PQESCAPE_BYTEA_CONN,1,[PostgreSQL 8.1.4 or later]))
   AC_CHECK_LIB(pq, 
PQsetnonblocking,AC_DEFINE(HAVE_PQSETNONBLOCKING,1,[PostgreSQL 7.0.x or later]))
   AC_CHECK_LIB(pq, PQcmdTuples,AC_DEFINE(HAVE_PQCMDTUPLES,1,[Broken libpq 
under windows]))
   AC_CHECK_LIB(pq, PQoidValue,AC_DEFINE(HAVE_PQOIDVALUE,1,[Older PostgreSQL]))
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_pgsql/pgsql_driver.c?r1=1.61r2=1.62diff_format=u
Index: php-src/ext/pdo_pgsql/pgsql_driver.c
diff -u php-src/ext/pdo_pgsql/pgsql_driver.c:1.61 
php-src/ext/pdo_pgsql/pgsql_driver.c:1.62
--- php-src/ext/pdo_pgsql/pgsql_driver.c:1.61   Wed Oct  4 23:53:54 2006
+++ php-src/ext/pdo_pgsql/pgsql_driver.cFri Oct  6 22:34:29 2006
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pgsql_driver.c,v 1.61 2006/10/04 23:53:54 iliaa Exp $ */
+/* $Id: pgsql_driver.c,v 1.62 2006/10/06 22:34:29 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -251,11 +251,16 @@
 static int pgsql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int 
unquotedlen, char **quoted, int *quotedlen, enum pdo_param_type paramtype 
TSRMLS_DC)
 {
unsigned char *escaped;
+   pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh-driver_data;

switch (paramtype) {
case PDO_PARAM_LOB:
/* escapedlen returned by PQescapeBytea() accounts for 
trailing 0 */
+#ifdef HAVE_PQESCAPE_BYTEA_CONN
+   escaped = PQescapeByteaConn(H-server, unquoted, 
unquotedlen, quotedlen);
+#else
escaped = PQescapeBytea(unquoted, unquotedlen, 
quotedlen);
+#endif
*quotedlen += 1;
*quoted = emalloc(*quotedlen + 1);
memcpy((*quoted)+1, escaped, *quotedlen-2);
@@ -264,9 +269,7 @@
(*quoted)[*quotedlen] = '\0';
free(escaped);
break;
-   default: {
-   pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle 
*)dbh-driver_data;
-
+   default:
*quoted = safe_emalloc(2, unquotedlen, 3);
(*quoted)[0] = '\'';
 #ifndef HAVE_PQESCAPE_CONN
@@ -277,7 +280,6 @@
(*quoted)[*quotedlen + 1] = '\'';
(*quoted)[*quotedlen + 2] = '\0';
*quotedlen += 2;
-   }
}
return 1;
 }

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



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

2006-10-06 Thread Andrei Zmievski
andrei  Sat Oct  7 00:41:14 2006 UTC

  Modified files:  
/php-src/ext/standard   uniqid.c 
  Log:
  Default to ZEND_STR_TYPE.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/uniqid.c?r1=1.46r2=1.47diff_format=u
Index: php-src/ext/standard/uniqid.c
diff -u php-src/ext/standard/uniqid.c:1.46 php-src/ext/standard/uniqid.c:1.47
--- php-src/ext/standard/uniqid.c:1.46  Fri Oct  6 20:00:37 2006
+++ php-src/ext/standard/uniqid.c   Sat Oct  7 00:41:14 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: uniqid.c,v 1.46 2006/10/06 20:00:37 andrei Exp $ */
+/* $Id: uniqid.c,v 1.47 2006/10/07 00:41:14 andrei Exp $ */
 
 #include php.h
 
@@ -45,7 +45,7 @@
 {
zstr prefix = EMPTY_ZSTR;
int prefix_len = 0;
-   zend_uchar str_type;
+   zend_uchar str_type = ZEND_STR_TYPE;
 #if defined(__CYGWIN__)
zend_bool more_entropy = 1;
 #else

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



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

2006-10-06 Thread Sara Golemon
pollita Sat Oct  7 04:45:42 2006 UTC

  Modified files:  
/php-src/ext/standard   type.c 
  Log:
  Win32 build gets confused by expansion of U_STRING_DECL macro with constants
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/type.c?r1=1.45r2=1.46diff_format=u
Index: php-src/ext/standard/type.c
diff -u php-src/ext/standard/type.c:1.45 php-src/ext/standard/type.c:1.46
--- php-src/ext/standard/type.c:1.45Fri Oct  6 20:11:25 2006
+++ php-src/ext/standard/type.c Sat Oct  7 04:45:42 2006
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: type.c,v 1.45 2006/10/06 20:11:25 andrei Exp $ */
+/* $Id: type.c,v 1.46 2006/10/07 04:45:42 pollita Exp $ */
 
 #include php.h
 #include php_incomplete_class.h
@@ -238,8 +238,8 @@
/* We can get away with this because 
INCOMPLETE_CLASS is ascii and has a 1:1 relationship with unicode */
RETURN_TRUE;
} else if (UG(unicode)) {
-   U_STRING_DECL(uIncompleteClass, 
INCOMPLETE_CLASS, sizeof(INCOMPLETE_CLASS) - 1);
-   U_STRING_INIT(uIncompleteClass, 
INCOMPLETE_CLASS, sizeof(INCOMPLETE_CLASS) - 1);
+   U_STRING_DECL(uIncompleteClass, 
(INCOMPLETE_CLASS), sizeof(INCOMPLETE_CLASS) - 1);
+   U_STRING_INIT(uIncompleteClass, 
(INCOMPLETE_CLASS), sizeof(INCOMPLETE_CLASS) - 1);
 
if (!memcmp(ce-name.u, uIncompleteClass, 
UBYTES(sizeof(INCOMPLETE_CLASS {
RETURN_FALSE;

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