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

2005-11-07 Thread changelog
changelog   Tue Nov  8 01:43:37 2005 EDT

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.2157r2=1.2158ty=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2157 php-src/ChangeLog:1.2158
--- php-src/ChangeLog:1.2157Mon Nov  7 01:58:18 2005
+++ php-src/ChangeLog   Tue Nov  8 01:43:07 2005
@@ -1,3 +1,52 @@
+2005-11-07  Marcus Boerger  [EMAIL PROTECTED]
+
+* sapi/cli/php_cli_readline.c:
+  - heredoc handling in -a mode
+
+2005-11-07  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  NEWS:
+  Fixed bug #35135 (PDOStatment without related PDO object may crash).
+
+2005-11-07  Marcus Boerger  [EMAIL PROTECTED]
+
+* (PHP_4_4)
+  ext/pgsql/pgsql.c
+  ext/pgsql/tests/80_bug32223b.phpt:
+  - MFH Fix Bug #32223 weird behaviour of pg_last_notice
+
+* (PHP_5_1)
+  ext/pgsql/pgsql.c
+  ext/pgsql/tests/80_bug32223b.phpt:
+  - MFH Bug #32223 weird behaviour of pg_last_notice
+
+* ext/pgsql/tests/80_bug32223b.phpt
+  ext/pgsql/tests/80_bug32223b.phpt
+  ext/pgsql/tests/80_bug32223b.phpt:
+1.1.4;
+  - Fix Bug #32223 weird behaviour of pg_last_notice
+
+* ext/pgsql/pgsql.c:
+  - Fix Bug #32223 weird behaviour of pg_last_notice
+
+2005-11-07  Dmitry Stogov  [EMAIL PROTECTED]
+
+* (PHP_4_4)
+  NEWS
+  NEWS
+  NEWS
+  Zend/zend.c
+  ZendEngine2/zend.c
+  ZendEngine2/zend.c
+  ZendEngine2/zend.c:
+  Fixed bug #35009 (ZTS: Persistent resource destruct crashes when 
extension
+  is compiled as shared)
+
+* (PHP_5_1)
+  NEWS:
+  Fixed bug #35091 (SoapClient leaks memory)
+
 2005-11-06  Greg Beaver  [EMAIL PROTECTED]
 
 * (PHP_5_0)
@@ -16096,7 +16145,7 @@
 
 * (PHP_4_3)
   ext/standard/url_scanner_ex.re:
-  Missing $Id: ChangeLog,v 1.2157 2005/11/07 06:58:18 changelog Exp $ tag
+  Missing $Id: ChangeLog,v 1.2158 2005/11/08 06:43:07 changelog Exp $ tag
 
 * (PHP_5_0)
   ext/standard/url_scanner_ex.c:
@@ -19497,7 +19546,7 @@
   ext/session/mod_mm.h
   ext/session/mod_user.h
   ext/session/php_session.h:
-  - Missing $Id: ChangeLog,v 1.2157 2005/11/07 06:58:18 changelog Exp $ 
tags
+  - Missing $Id: ChangeLog,v 1.2158 2005/11/08 06:43:07 changelog Exp $ 
tags
 
 * (PHP_4_3)
   ext/session/session.c:
@@ -19978,7 +20027,7 @@
 
 * (PHP_4_3)
   Zend/zend_ini_scanner.l:
-  Missing $Id: ChangeLog,v 1.2157 2005/11/07 06:58:18 changelog Exp $ tag 
+ ws fix
+  Missing $Id: ChangeLog,v 1.2158 2005/11/08 06:43:07 changelog Exp $ tag 
+ ws fix
 
 * ZendEngine2/zend_ini_scanner.l
   ZendEngine2/zend_ini_scanner.l:
@@ -21452,7 +21501,7 @@
   ext/standard/url_scanner_ex.c
   ext/standard/url_scanner_ex.h
   ext/standard/url_scanner_ex.re:
-  Missing $Id: ChangeLog,v 1.2157 2005/11/07 06:58:18 changelog Exp $ tag
+  Missing $Id: ChangeLog,v 1.2158 2005/11/08 06:43:07 changelog Exp $ tag
 
 * ext/standard/credits_ext.h
   ext/standard/credits_sapi.h:


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

2005-11-07 Thread changelog
changelog   Tue Nov  8 01:44:27 2005 EDT

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/diff.php/ZendEngine2/ChangeLog?r1=1.806r2=1.807ty=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.806 ZendEngine2/ChangeLog:1.807
--- ZendEngine2/ChangeLog:1.806 Fri Nov  4 01:46:21 2005
+++ ZendEngine2/ChangeLog   Tue Nov  8 01:44:26 2005
@@ -1,3 +1,11 @@
+2005-11-07  Dmitry Stogov  [EMAIL PROTECTED]
+
+* zend.c
+  zend.c
+  zend.c:
+  Fixed bug #35009 (ZTS: Persistent resource destruct crashes when 
extension
+  is compiled as shared)
+
 2005-11-03  Marcus Boerger  [EMAIL PROTECTED]
 
 * (PHP_5_1)
@@ -11000,7 +11008,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.806 2005/11/04 06:46:21 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.807 2005/11/08 06:44:26 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -12724,7 +12732,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.806 2005/11/04 06:46:21 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.807 2005/11/08 06:44:26 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


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

2005-11-07 Thread Dmitry Stogov
dmitry  Mon Nov  7 05:07:56 2005 EDT

  Modified files:  
/php-src/ext/soap   soap.c 
  Log:
  Fixed bug #35091 (SoapClient leaks memory)
  
  
http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.165r2=1.166ty=u
Index: php-src/ext/soap/soap.c
diff -u php-src/ext/soap/soap.c:1.165 php-src/ext/soap/soap.c:1.166
--- php-src/ext/soap/soap.c:1.165   Wed Oct 19 03:55:05 2005
+++ php-src/ext/soap/soap.c Mon Nov  7 05:07:55 2005
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: soap.c,v 1.165 2005/10/19 07:55:05 dmitry Exp $ */
+/* $Id: soap.c,v 1.166 2005/11/07 10:07:55 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -981,7 +981,6 @@
 
ret = zend_list_insert(service, le_service);
add_property_resource(this_ptr, service, ret);
-   zend_list_addref(ret);
 
SOAP_SERVER_END_CODE();
 }
@@ -2211,7 +2210,6 @@
ret = zend_list_insert(sdl, le_sdl);
 
add_property_resource(this_ptr, sdl, ret);
-   zend_list_addref(ret);
 
SOAP_GLOBAL(soap_version) = old_soap_version;
}

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



[PHP-CVS] cvs: php-src /ext/pgsql pgsql.c /ext/pgsql/tests 80_bug32223b.phpt

2005-11-07 Thread Marcus Boerger
helly   Mon Nov  7 07:56:23 2005 EDT

  Added files: 
/php-src/ext/pgsql/tests80_bug32223b.phpt 

  Modified files:  
/php-src/ext/pgsql  pgsql.c 
  Log:
  - Fix Bug #32223 weird behaviour of pg_last_notice 
  
  
http://cvs.php.net/diff.php/php-src/ext/pgsql/pgsql.c?r1=1.334r2=1.335ty=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.334 php-src/ext/pgsql/pgsql.c:1.335
--- php-src/ext/pgsql/pgsql.c:1.334 Sun Nov  6 07:01:42 2005
+++ php-src/ext/pgsql/pgsql.c   Mon Nov  7 07:56:19 2005
@@ -20,7 +20,7 @@
+--+
  */
  
-/* $Id: pgsql.c,v 1.334 2005/11/06 12:01:42 helly Exp $ */
+/* $Id: pgsql.c,v 1.335 2005/11/07 12:56:19 helly Exp $ */
 
 #include stdlib.h
 
@@ -345,7 +345,7 @@
if (PGG(log_notices)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, %s, 
notice-message);
}
-   zend_hash_index_update(PGG(notices), *(int *)resource_id, 
(void **)notice, sizeof(php_pgsql_notice *), NULL);
+   zend_hash_index_update(PGG(notices), (int)resource_id, (void 
**)notice, sizeof(php_pgsql_notice *), NULL);
}
 }
 /* }}} */
@@ -783,7 +783,7 @@
}
/* set notice processer */
if (! PGG(ignore_notices)  Z_TYPE_P(return_value) == IS_RESOURCE) {
-   PQsetNoticeProcessor(pgsql, _php_pgsql_notice_handler, (void 
*)Z_RESVAL_P(return_value));
+   PQsetNoticeProcessor(pgsql, _php_pgsql_notice_handler, 
(void*)Z_RESVAL_P(return_value));
}
php_pgsql_set_default_link(Z_LVAL_P(return_value) TSRMLS_CC);


http://cvs.php.net/co.php/php-src/ext/pgsql/tests/80_bug32223b.phpt?r=1.1p=1
Index: php-src/ext/pgsql/tests/80_bug32223b.phpt
+++ php-src/ext/pgsql/tests/80_bug32223b.phpt
--TEST--
Bug #32223 (weird behaviour of pg_last_notice using define)
--SKIPIF--
?php 
require_once('skipif.inc');

@pg_query($conn, CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler 
LANCOMPILER 'PL/pgSQL');
$res = @pg_query($conn, CREATE OR REPLACE FUNCTION test_notice() RETURNS 
boolean AS '
begin
RAISE NOTICE ''1'';
return ''f'';
end;
' LANGUAGE plpgsql;);
if (!$res) die('skip PLPGSQL not available');
?
--FILE--
?php

require('config.inc');

define ('dbh', pg_connect($conn_str));
//$dbh = @pg_connect($conn_str);
if (!dbh) {
die (Could not connect to the server);
}

//@pg_query(dbh, CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler 
LANCOMPILER 'PL/pgSQL');
$res = pg_query(dbh, CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean 
AS '
begin
RAISE NOTICE ''1'';
return ''f'';
end;
' LANGUAGE plpgsql;);

function tester() {
$res = pg_query(dbh, 'SELECT test_notice()');
$row = pg_fetch_row($res, 0);
var_dump($row);
pg_free_result($res);
if ($row[0] == 'f')
{
var_dump(pg_last_notice(dbh));
}
}
tester();

pg_close(dbh);

?
===DONE===
--EXPECTF--
array(1) {
  [0]=
  string(1) f
}
string(14) NOTICE:  1
===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_1) /ext/pgsql pgsql.c /ext/pgsql/tests 80_bug32223b.phpt

2005-11-07 Thread Marcus Boerger
helly   Mon Nov  7 07:57:50 2005 EDT

  Added files: (Branch: PHP_5_1)
/php-src/ext/pgsql/tests80_bug32223b.phpt 

  Modified files:  
/php-src/ext/pgsql  pgsql.c 
  Log:
  - MFH Bug #32223 weird behaviour of pg_last_notice 
  
  
http://cvs.php.net/diff.php/php-src/ext/pgsql/pgsql.c?r1=1.331.2.3r2=1.331.2.4ty=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.331.2.3 php-src/ext/pgsql/pgsql.c:1.331.2.4
--- php-src/ext/pgsql/pgsql.c:1.331.2.3 Sun Nov  6 06:58:34 2005
+++ php-src/ext/pgsql/pgsql.c   Mon Nov  7 07:57:49 2005
@@ -20,7 +20,7 @@
+--+
  */
  
-/* $Id: pgsql.c,v 1.331.2.3 2005/11/06 11:58:34 helly Exp $ */
+/* $Id: pgsql.c,v 1.331.2.4 2005/11/07 12:57:49 helly Exp $ */
 
 #include stdlib.h
 
@@ -345,7 +345,7 @@
if (PGG(log_notices)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, %s, 
notice-message);
}
-   zend_hash_index_update(PGG(notices), *(int *)resource_id, 
(void **)notice, sizeof(php_pgsql_notice *), NULL);
+   zend_hash_index_update(PGG(notices), (int)resource_id, (void 
**)notice, sizeof(php_pgsql_notice *), NULL);
}
 }
 /* }}} */
@@ -783,7 +783,7 @@
}
/* set notice processer */
if (! PGG(ignore_notices)  Z_TYPE_P(return_value) == IS_RESOURCE) {
-   PQsetNoticeProcessor(pgsql, _php_pgsql_notice_handler, (void 
*)Z_RESVAL_P(return_value));
+   PQsetNoticeProcessor(pgsql, _php_pgsql_notice_handler, 
(void*)Z_RESVAL_P(return_value));
}
php_pgsql_set_default_link(Z_LVAL_P(return_value) TSRMLS_CC);


http://cvs.php.net/co.php/php-src/ext/pgsql/tests/80_bug32223b.phpt?r=1.1p=1
Index: php-src/ext/pgsql/tests/80_bug32223b.phpt
+++ php-src/ext/pgsql/tests/80_bug32223b.phpt
--TEST--
Bug #32223 (weird behaviour of pg_last_notice using define)
--SKIPIF--
?php 
require_once('skipif.inc');

@pg_query($conn, CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler 
LANCOMPILER 'PL/pgSQL');
$res = @pg_query($conn, CREATE OR REPLACE FUNCTION test_notice() RETURNS 
boolean AS '
begin
RAISE NOTICE ''1'';
return ''f'';
end;
' LANGUAGE plpgsql;);
if (!$res) die('skip PLPGSQL not available');
?
--FILE--
?php

require('config.inc');

define ('dbh', pg_connect($conn_str));
//$dbh = @pg_connect($conn_str);
if (!dbh) {
die (Could not connect to the server);
}

//@pg_query(dbh, CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler 
LANCOMPILER 'PL/pgSQL');
$res = pg_query(dbh, CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean 
AS '
begin
RAISE NOTICE ''1'';
return ''f'';
end;
' LANGUAGE plpgsql;);

function tester() {
$res = pg_query(dbh, 'SELECT test_notice()');
$row = pg_fetch_row($res, 0);
var_dump($row);
pg_free_result($res);
if ($row[0] == 'f')
{
var_dump(pg_last_notice(dbh));
}
}
tester();

pg_close(dbh);

?
===DONE===
--EXPECTF--
array(1) {
  [0]=
  string(1) f
}
string(14) NOTICE:  1
===DONE===

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



[PHP-CVS] cvs: php-src(PHP_4_4) /ext/pgsql pgsql.c /ext/pgsql/tests 80_bug32223b.phpt

2005-11-07 Thread Marcus Boerger
helly   Mon Nov  7 08:01:37 2005 EDT

  Added files: (Branch: PHP_4_4)
/php-src/ext/pgsql/tests80_bug32223b.phpt 

  Modified files:  
/php-src/ext/pgsql  pgsql.c 
  Log:
  - MFH Fix Bug #32223 weird behaviour of pg_last_notice 
  
  
http://cvs.php.net/diff.php/php-src/ext/pgsql/pgsql.c?r1=1.244.2.40.2.1r2=1.244.2.40.2.2ty=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.244.2.40.2.1 
php-src/ext/pgsql/pgsql.c:1.244.2.40.2.2
--- php-src/ext/pgsql/pgsql.c:1.244.2.40.2.1Tue Jul  5 08:50:03 2005
+++ php-src/ext/pgsql/pgsql.c   Mon Nov  7 08:01:36 2005
@@ -19,7 +19,7 @@
+--+
  */
  
-/* $Id: pgsql.c,v 1.244.2.40.2.1 2005/07/05 12:50:03 derick Exp $ */
+/* $Id: pgsql.c,v 1.244.2.40.2.2 2005/11/07 13:01:36 helly Exp $ */
 
 #include stdlib.h
 
@@ -310,7 +310,7 @@
if (PGG(log_notices)) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, %s, 
notice-message);
}
-   zend_hash_index_update(PGG(notices), *(int *)resource_id, 
(void **)notice, sizeof(php_pgsql_notice *), NULL);
+   zend_hash_index_update(PGG(notices), (int)resource_id, (void 
**)notice, sizeof(php_pgsql_notice *), NULL);
}
 }
 /* }}} */
@@ -694,7 +694,7 @@
}
/* set notice processer */
if (! PGG(ignore_notices)  Z_TYPE_P(return_value) == IS_RESOURCE) {
-   PQsetNoticeProcessor(pgsql, _php_pgsql_notice_handler, (void 
*)Z_RESVAL_P(return_value));
+   PQsetNoticeProcessor(pgsql, _php_pgsql_notice_handler, (void 
*)Z_RESVAL_P(return_value));
}
php_pgsql_set_default_link(Z_LVAL_P(return_value) TSRMLS_CC);


http://cvs.php.net/co.php/php-src/ext/pgsql/tests/80_bug32223b.phpt?r=1.1p=1
Index: php-src/ext/pgsql/tests/80_bug32223b.phpt
+++ php-src/ext/pgsql/tests/80_bug32223b.phpt
--TEST--
Bug #32223 (weird behaviour of pg_last_notice using define)
--SKIPIF--
?php 
require_once('skipif.inc');

@pg_query($conn, CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler 
LANCOMPILER 'PL/pgSQL');
$res = @pg_query($conn, CREATE OR REPLACE FUNCTION test_notice() RETURNS 
boolean AS '
begin
RAISE NOTICE ''1'';
return ''f'';
end;
' LANGUAGE plpgsql;);
if (!$res) die('skip PLPGSQL not available');
?
--FILE--
?php

require('config.inc');

define ('dbh', pg_connect($conn_str));
//$dbh = @pg_connect($conn_str);
if (!dbh) {
die (Could not connect to the server);
}

//@pg_query(dbh, CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler 
LANCOMPILER 'PL/pgSQL');
$res = pg_query(dbh, CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean 
AS '
begin
RAISE NOTICE ''1'';
return ''f'';
end;
' LANGUAGE plpgsql;);

function tester() {
$res = pg_query(dbh, 'SELECT test_notice()');
$row = pg_fetch_row($res, 0);
var_dump($row);
pg_free_result($res);
if ($row[0] == 'f')
{
var_dump(pg_last_notice(dbh));
}
}
tester();

pg_close(dbh);

?
===DONE===
--EXPECTF--
array(1) {
  [0]=
  string(1) f
}
string(14) NOTICE:  1
===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_1) /ext/spl php_spl.c

2005-11-07 Thread Marcus Boerger
helly   Mon Nov  7 08:08:29 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/splphp_spl.c 
  Log:
  - Drop unnecessary param
  
http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.52.2.14r2=1.52.2.15ty=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.52.2.14 php-src/ext/spl/php_spl.c:1.52.2.15
--- php-src/ext/spl/php_spl.c:1.52.2.14 Thu Nov  3 17:06:30 2005
+++ php-src/ext/spl/php_spl.c   Mon Nov  7 08:08:24 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.52.2.14 2005/11/03 22:06:30 helly Exp $ */
+/* $Id: php_spl.c,v 1.52.2.15 2005/11/07 13:08:24 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
#include config.h
@@ -395,7 +395,7 @@
zend_str_tolower_copy(tmp_name, 
Z_STRVAL_P(zcallable), Z_STRLEN_P(zcallable));
if (!strcmp(tmp_name, spl_autoload_call)) {
if (do_throw) {
-   
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, Function 
spl_autoload_call() cannot be registered, func_name);
+   
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, Function 
spl_autoload_call() cannot be registered);
}
return;
}

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



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS /ext/pdo pdo_stmt.c

2005-11-07 Thread Ilia Alshanetsky
iliaa   Mon Nov  7 11:53:17 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/pdopdo_stmt.c 
/php-srcNEWS 
  Log:
  Fixed bug #35135 (PDOStatment without related PDO object may crash).
  
  http://cvs.php.net/diff.php/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.15r2=1.118.2.16ty=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.15 
php-src/ext/pdo/pdo_stmt.c:1.118.2.16
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.15   Mon Oct 31 02:47:40 2005
+++ php-src/ext/pdo/pdo_stmt.c  Mon Nov  7 11:53:12 2005
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: pdo_stmt.c,v 1.118.2.15 2005/10/31 07:47:40 helly Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.16 2005/11/07 16:53:12 iliaa Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -69,6 +69,12 @@
 /* }}} */
 #endif
 
+#define PHP_STMT_GET_OBJ   \
+  pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object(getThis() 
TSRMLS_CC);   \
+  if (!stmt-dbh) {\
+RETURN_FALSE;  \
+  }\
+
 static PHP_FUNCTION(dbstmt_constructor) /* {{{ */
 {
php_error_docref(NULL TSRMLS_CC, E_ERROR, You should not create a 
PDOStatement manually);
@@ -333,9 +339,9 @@
Execute a prepared statement, optionally binding parameters */
 static PHP_METHOD(PDOStatement, execute)
 {
-   pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
zval *input_params = NULL;
int ret = 1;
+   PHP_STMT_GET_OBJ;
 
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |a!, 
input_params)) {
RETURN_FALSE;
@@ -1144,7 +1150,7 @@
long how = PDO_FETCH_USE_DEFAULT;
long ori = PDO_FETCH_ORI_NEXT;
long off = 0;
-   pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
+PHP_STMT_GET_OBJ;
 
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |lll, 
how,
ori, off)) {
@@ -1177,8 +1183,8 @@
zval *old_ctor_args, *ctor_args;
int error = 0, old_arg_count;
 
-   pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
-   
+   PHP_STMT_GET_OBJ;
+
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |sz, 
class_name, class_name_len, ctor_args)) {
RETURN_FALSE;
@@ -1245,8 +1251,8 @@
Returns a data of the specified column in the result set. */
 static PHP_METHOD(PDOStatement, fetchColumn)
 {
-   pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
long col_n = 0;
+   PHP_STMT_GET_OBJ;
 
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |l, 
col_n)) {
RETURN_FALSE;
@@ -1267,13 +1273,13 @@
Returns an array of all of the results. */
 static PHP_METHOD(PDOStatement, fetchAll)
 {
-   pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
long how = PDO_FETCH_USE_DEFAULT;
zval *data, *return_all;
zval *arg2;
zend_class_entry *old_ce;
zval *old_ctor_args, *ctor_args = NULL;
int error = 0, old_arg_count;
+   PHP_STMT_GET_OBJ; 
 
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |lzz, 
how, arg2, ctor_args)) {
RETURN_FALSE;
@@ -1442,8 +1448,8 @@
bind an input parameter to the value of a PHP variable.  $paramno is the 
1-based position of the placeholder in the SQL statement (but can be the 
parameter name for drivers that support named placeholders).  It should be 
called prior to execute(). */
 static PHP_METHOD(PDOStatement, bindValue)
 {
-   pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
struct pdo_bound_param_data param = {0};
+   PHP_STMT_GET_OBJ;
 
param.paramno = -1;
param.param_type = PDO_PARAM_STR;
@@ -1472,7 +1478,7 @@
bind a parameter to a PHP variable.  $paramno is the 1-based position of 
the placeholder in the SQL statement (but can be the parameter name for drivers 
that support named placeholders).  This isn't supported by all drivers.  It 
should be called prior to execute(). */
 static PHP_METHOD(PDOStatement, bindParam)
 {
-   pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
+   PHP_STMT_GET_OBJ;
RETURN_BOOL(register_bound_param(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
stmt, TRUE));
 }
 /* }}} */
@@ -1481,7 +1487,7 @@
bind a column to a PHP variable.  On each row fetch $param will contain the 
value of the corresponding column.  $column is the 1-based offset of the 
column, or the column name.  For portability, don't call this before execute(). 
*/
 static PHP_METHOD(PDOStatement, bindColumn)
 {
-   pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
+   PHP_STMT_GET_OBJ;

[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl/tests iterator_025.phpt iterator_026.phpt iterator_028.phpt

2005-11-07 Thread Marcus Boerger
helly   Mon Nov  7 13:38:25 2005 EDT

  Added files: (Branch: PHP_5_1)
/php-src/ext/spl/tests  iterator_025.phpt iterator_026.phpt 
iterator_028.phpt 
  Log:
  - Add new tests
  
  

http://cvs.php.net/co.php/php-src/ext/spl/tests/iterator_025.phpt?r=1.1p=1
Index: php-src/ext/spl/tests/iterator_025.phpt
+++ php-src/ext/spl/tests/iterator_025.phpt
--TEST--
SPL: RecursiveIteratorIterator and begin/endIteration()
--FILE--
?php

class MyRecursiveIteratorIterator extends RecursiveIteratorIterator
{
function beginIteration()
{
echo __METHOD__ . ()\n;
}

function endIteration()
{
echo __METHOD__ . ()\n;
}
}

$ar = array(1, 2, array(31, 32, array(331)), 4);

$it = new MyRecursiveIteratorIterator(new ArrayObject($ar, 0, 
RecursiveArrayIterator));

foreach($it as $v) echo $v\n;

echo ===MORE===\n;

foreach($it as $v) echo $v\n;

echo ===MORE===\n;

$it-rewind();
foreach($it as $v) echo $v\n;
var_dump($it-valid());

echo ===MANUAL===\n;

$it-rewind();
while($it-valid())
{
echo $it-current() . \n;
$it-next();
break;
}
$it-rewind();
while($it-valid())
{
echo $it-current() . \n;
$it-next();
}

?
===DONE===
?php exit(0); ?
--EXPECT--
MyRecursiveIteratorIterator::beginIteration()
1
2
31
32
331
4
MyRecursiveIteratorIterator::endIteration()
===MORE===
MyRecursiveIteratorIterator::beginIteration()
1
2
31
32
331
4
MyRecursiveIteratorIterator::endIteration()
===MORE===
MyRecursiveIteratorIterator::beginIteration()
1
2
31
32
331
4
MyRecursiveIteratorIterator::endIteration()
bool(false)
===MANUAL===
MyRecursiveIteratorIterator::beginIteration()
1
1
2
31
32
331
4
MyRecursiveIteratorIterator::endIteration()
===DONE===

http://cvs.php.net/co.php/php-src/ext/spl/tests/iterator_026.phpt?r=1.1p=1
Index: php-src/ext/spl/tests/iterator_026.phpt
+++ php-src/ext/spl/tests/iterator_026.phpt
--TEST--
SPL: CachingIterator::hasNext()
--FILE--
?php

$ar = array(1, 2, array(31, 32, array(331)), 4);

$it = new RecursiveArrayIterator($ar);
$it = new CachingRecursiveIterator($it);
$it = new RecursiveIteratorIterator($it);

foreach($it as $k=$v)
{
echo $k=$v\n;
echo hasNext:  . ($it-getInnerIterator()-hasNext() ? yes : no) 
. \n;
}

?
===DONE===
?php exit(0); ?
--EXPECT--
0=1
hasNext: yes
1=2
hasNext: yes
0=31
hasNext: yes
1=32
hasNext: yes
0=331
hasNext: no
3=4
hasNext: no
===DONE===

http://cvs.php.net/co.php/php-src/ext/spl/tests/iterator_028.phpt?r=1.1p=1
Index: php-src/ext/spl/tests/iterator_028.phpt
+++ php-src/ext/spl/tests/iterator_028.phpt
--TEST--
SPL: RecursiveIteratorIterator and setMaxDepth()
--FILE--
?php

$ar = array(1, 2, array(31, 32, array(331, array(3321, array(33221, 4);

$it = new RecursiveIteratorIterator(new RecursiveArrayIterator($ar));

echo ===?===\n;
var_dump($it-getMaxDepth());
foreach($it as $v) echo $it-getDepth() . : $v\n;

echo ===2===\n;
$it-setMaxDepth(2);
var_dump($it-getMaxDepth());
foreach($it as $v) echo $it-getDepth() . : $v\n;

echo ===X===\n;
$it-setMaxDepth();
var_dump($it-getMaxDepth());
foreach($it as $v) echo $it-getDepth() . : $v\n;

echo ===3===\n;
$it-setMaxDepth(3);
var_dump($it-getMaxDepth());
foreach($it as $v) echo $it-getDepth() . : $v\n;

echo ===5===\n;
$it-setMaxDepth(5);
var_dump($it-getMaxDepth());
foreach($it as $v) echo $it-getDepth() . : $v\n;

echo ===0===\n;
$it-setMaxDepth(0);
var_dump($it-getMaxDepth());
foreach($it as $v) echo $it-getDepth() . : $v\n;

echo ===-1===\n;
$it-setMaxDepth(-1);
var_dump($it-getMaxDepth());
try
{
$it-setMaxDepth(4);
$it-setMaxDepth(-2);
}
catch(Exception $e)
{
var_dump($e-getMessage());
}
var_dump($it-getMaxDepth());
?
===DONE===
?php exit(0); ?
--EXPECT--
===?===
bool(false)
0: 1
0: 2
1: 31
1: 32
2: 331
3: 3321
4: 33221
0: 4
===2===
int(2)
0: 1
0: 2
1: 31
1: 32
2: 331
0: 4
===X===
bool(false)
0: 1
0: 2
1: 31
1: 32
2: 331
3: 3321
4: 33221
0: 4
===3===
int(3)
0: 1
0: 2
1: 31
1: 32
2: 331
3: 3321
0: 4
===5===
int(5)
0: 1
0: 2
1: 31
1: 32
2: 331
3: 3321
4: 33221
0: 4
===0===
int(0)
0: 1
0: 2
0: 4
===-1===
bool(false)
string(33) Parameter max_depth must be = -1
int(4)
===DONE===

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



[PHP-CVS] cvs: php-src /sapi/cli php_cli_readline.c

2005-11-07 Thread Marcus Boerger
helly   Mon Nov  7 14:12:47 2005 EDT

  Modified files:  
/php-src/sapi/cli   php_cli_readline.c 
  Log:
  - heredoc handling in -a mode
  
  
http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli_readline.c?r1=1.4r2=1.5ty=u
Index: php-src/sapi/cli/php_cli_readline.c
diff -u php-src/sapi/cli/php_cli_readline.c:1.4 
php-src/sapi/cli/php_cli_readline.c:1.5
--- php-src/sapi/cli/php_cli_readline.c:1.4 Sun Aug 14 09:09:34 2005
+++ php-src/sapi/cli/php_cli_readline.c Mon Nov  7 14:12:37 2005
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_cli_readline.c,v 1.4 2005/08/14 13:09:34 johannes Exp $ */
+/* $Id: php_cli_readline.c,v 1.5 2005/11/07 19:12:37 helly Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -217,8 +217,11 @@
}
break;
case heredoc:
-   if (code[i - (heredoc_len + 1)] == '\n'  
!strncmp(code + i - heredoc_len, heredoc_tag, heredoc_len)) {
+   if (code[i - (heredoc_len + 1)] == '\n'  
!strncmp(code + i - heredoc_len, heredoc_tag, heredoc_len)  code[i] == '\n') {
code_type = body;
+   } else if (code[i - (heredoc_len + 2)] == '\n' 
 !strncmp(code + i - heredoc_len - 1, heredoc_tag, heredoc_len)  code[i-1] 
== ';'  code[i] == '\n') {
+   code_type = body;
+   valid_end = 1;
}
break;
case outside:

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



[PHP-CVS] cvs: php-src(PHP_5_1) /sapi/cli php_cli_readline.c

2005-11-07 Thread Marcus Boerger
helly   Mon Nov  7 14:14:42 2005 EDT

  Modified files:  (Branch: PHP_5_1)
/php-src/sapi/cli   php_cli_readline.c 
  Log:
  - MFH heredoc handling in -a mode
  
  
http://cvs.php.net/diff.php/php-src/sapi/cli/php_cli_readline.c?r1=1.3.2.1r2=1.3.2.2ty=u
Index: php-src/sapi/cli/php_cli_readline.c
diff -u php-src/sapi/cli/php_cli_readline.c:1.3.2.1 
php-src/sapi/cli/php_cli_readline.c:1.3.2.2
--- php-src/sapi/cli/php_cli_readline.c:1.3.2.1 Sun Aug 14 09:07:15 2005
+++ php-src/sapi/cli/php_cli_readline.c Mon Nov  7 14:14:40 2005
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: php_cli_readline.c,v 1.3.2.1 2005/08/14 13:07:15 johannes Exp $ */
+/* $Id: php_cli_readline.c,v 1.3.2.2 2005/11/07 19:14:40 helly Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -217,8 +217,11 @@
}
break;
case heredoc:
-   if (code[i - (heredoc_len + 1)] == '\n'  
!strncmp(code + i - heredoc_len, heredoc_tag, heredoc_len)) {
+   if (code[i - (heredoc_len + 1)] == '\n'  
!strncmp(code + i - heredoc_len, heredoc_tag, heredoc_len)  code[i] == '\n') {
code_type = body;
+   } else if (code[i - (heredoc_len + 2)] == '\n' 
 !strncmp(code + i - heredoc_len - 1, heredoc_tag, heredoc_len)  code[i-1] 
== ';'  code[i] == '\n') {
+   code_type = body;
+   valid_end = 1;
}
break;
case outside:

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



[PHP-CVS] cvs: php-src /ext/standard Makefile.frag url_scanner_ex.c var_unserializer.c

2005-11-07 Thread Jani Taskinen
sniper  Mon Nov  7 19:02:55 2005 EDT

  Modified files:  
/php-src/ext/standard   Makefile.frag url_scanner_ex.c 
var_unserializer.c 
  Log:
  - Make sure the generated files have relative paths in the #line directives
  
  http://cvs.php.net/diff.php/php-src/ext/standard/Makefile.frag?r1=1.9r2=1.10ty=u
Index: php-src/ext/standard/Makefile.frag
diff -u php-src/ext/standard/Makefile.frag:1.9 
php-src/ext/standard/Makefile.frag:1.10
--- php-src/ext/standard/Makefile.frag:1.9  Sun Oct 16 16:41:02 2005
+++ php-src/ext/standard/Makefile.frag  Mon Nov  7 19:02:47 2005
@@ -1,9 +1,9 @@
 
 $(srcdir)/var_unserializer.c: $(srcdir)/var_unserializer.re
-   @$(RE2C) -b $(srcdir)/var_unserializer.re  $@
+   @(cd $(top_srcdir); $(RE2C) -b ext/standard/var_unserializer.re  $@)
 
 $(srcdir)/url_scanner_ex.c: $(srcdir)/url_scanner_ex.re
-   @$(RE2C) -b $(srcdir)/url_scanner_ex.re  $@
+   @(cd $(top_srcdir); $(RE2C) -b ext/standard/url_scanner_ex.re  $@)
 
 $(builddir)/info.lo: $(builddir)/../../main/build-defs.h
 
http://cvs.php.net/diff.php/php-src/ext/standard/url_scanner_ex.c?r1=1.95r2=1.96ty=u
Index: php-src/ext/standard/url_scanner_ex.c
diff -u php-src/ext/standard/url_scanner_ex.c:1.95 
php-src/ext/standard/url_scanner_ex.c:1.96
--- php-src/ext/standard/url_scanner_ex.c:1.95  Wed Aug  3 10:08:15 2005
+++ php-src/ext/standard/url_scanner_ex.c   Mon Nov  7 19:02:47 2005
@@ -1,5 +1,5 @@
-/* Generated by re2c 0.9.8 on Wed Jun 29 02:16:53 2005 */
-#line 1 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+/* Generated by re2c 0.9.10 on Tue Nov  8 02:01:27 2005 */
+#line 1 ext/standard/url_scanner_ex.re
 /*
   +--+
   | PHP Version 5|
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: url_scanner_ex.c,v 1.95 2005/08/03 14:08:15 sniper Exp $ */
+/* $Id: url_scanner_ex.c,v 1.96 2005/11/08 00:02:47 sniper Exp $ */
 
 #include php.h
 
@@ -91,7 +91,7 @@
STD_PHP_INI_ENTRY(url_rewriter.tags, 
a=href,area=href,frame=src,form=,fieldset=, PHP_INI_ALL, OnUpdateTags, 
url_adapt_state_ex, php_basic_globals, basic_globals)
 PHP_INI_END()
 
-#line 97 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 97 ext/standard/url_scanner_ex.re
 
 
 #define YYFILL(n) goto done
@@ -162,19 +162,19 @@
 yy2:   ++YYCURSOR;
goto yy3;
 yy3:
-#line 115 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 115 ext/standard/url_scanner_ex.re
 { smart_str_append(dest, url); return; }
 #line 168 stdout
 yy4:   ++YYCURSOR;
goto yy5;
 yy5:
-#line 116 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 116 ext/standard/url_scanner_ex.re
 { sep = separator; goto scan; }
 #line 174 stdout
 yy6:   ++YYCURSOR;
goto yy7;
 yy7:
-#line 117 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 117 ext/standard/url_scanner_ex.re
 { bash = p - 1; goto done; }
 #line 180 stdout
 yy8:   ++YYCURSOR;
@@ -186,12 +186,12 @@
}
goto yy10;
 yy10:
-#line 118 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 118 ext/standard/url_scanner_ex.re
 { goto scan; }
 #line 192 stdout
 }
 }
-#line 119 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 119 ext/standard/url_scanner_ex.re
 
 done:

@@ -410,7 +410,7 @@
 yy13:  ++YYCURSOR;
goto yy14;
 yy14:
-#line 287 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 287 ext/standard/url_scanner_ex.re
 { passthru(STD_ARGS); STATE = STATE_TAG; goto state_tag; }
 #line 416 stdout
 yy15:  ++YYCURSOR;
@@ -422,12 +422,12 @@
}
goto yy17;
 yy17:
-#line 288 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 288 ext/standard/url_scanner_ex.re
 { passthru(STD_ARGS); goto state_plain; }
 #line 428 stdout
 }
 }
-#line 289 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 289 ext/standard/url_scanner_ex.re
 
 
 state_tag: 
@@ -485,13 +485,13 @@
yych = *YYCURSOR;
goto yy25;
 yy21:
-#line 294 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 294 ext/standard/url_scanner_ex.re
 { handle_tag(STD_ARGS); /* Sets STATE */; passthru(STD_ARGS); if (STATE == 
STATE_PLAIN) goto state_plain; else goto state_next_arg; }
 #line 491 stdout
 yy22:  ++YYCURSOR;
goto yy23;
 yy23:
-#line 295 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 295 ext/standard/url_scanner_ex.re
 { passthru(STD_ARGS); goto state_plain_begin; }
 #line 497 stdout
 yy24:  ++YYCURSOR;
@@ -504,7 +504,7 @@
goto yy21;
 }
 }
-#line 296 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 296 ext/standard/url_scanner_ex.re
 
 
 state_next_arg_begin:
@@ -578,26 +578,26 @@
 yy28:  ++YYCURSOR;
goto yy29;
 yy29:
-#line 304 /usr/src/php/php5/ext/standard/url_scanner_ex.re
+#line 304 ext/standard/url_scanner_ex.re
 { passthru(STD_ARGS); handle_form(STD_ARGS); goto