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

2003-08-17 Thread changelog
changelog   Sun Aug 17 20:31:11 2003 EDT

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.278 ZendEngine2/ChangeLog:1.279
--- ZendEngine2/ChangeLog:1.278 Sat Aug 16 20:31:43 2003
+++ ZendEngine2/ChangeLog   Sun Aug 17 20:31:11 2003
@@ -1,3 +1,43 @@
+2003-08-17  Marcus Boerger  [EMAIL PROTECTED]
+
+* zend_API.h
+  zend_builtin_functions.c
+  zend_execute.c
+  zend_object_handlers.c
+  zend_operators.c
+  zend_reflection_api.c:
+  Fix warnings
+
+2003-08-17  Sascha Schumann  [EMAIL PROTECTED]
+
+* zend.h:
+  One bit fields need to be unsigned, otherwise there is no storage for
+  the sign bit
+  
+  A signed bit field has a length of 1 bit.
+
+* zend_API.h:
+  explicitly cast size_t to zend_uint to avoid warnings on 64 bit platforms.
+
+2003-08-17  Marcus Boerger  [EMAIL PROTECTED]
+
+* zend_execute.c:
+  Remove unnecessary if
+
+* zend_execute.c:
+  Put the code where it belongs - fixes a warning and confusion
+
+* zend_compile.c
+  zend_execute.c:
+  Implement a TBD: JMP to the end of foreach
+
+* zend_compile.c:
+  WS
+
+* zend_API.c:
+  - Show class names in error messages when dealing with methods
+  - Mark class as abstract if it gets an abstract method
+
 2003-08-16  Marcus Boerger  [EMAIL PROTECTED]
 
 * zend_API.c
@@ -973,7 +1013,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.278 2003/08/17 00:31:43 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.279 2003/08/18 00:31:11 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -2697,7 +2737,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.278 2003/08/17 00:31:43 changelog 
Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.279 2003/08/18 00:31:11 changelog 
Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 




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

2003-08-17 Thread David Croft
david   Sun Aug 17 05:57:21 2003 EDT

  Modified files:  
/php-src/ext/standard   dl.c 
  Log:
  #typo
  
  
Index: php-src/ext/standard/dl.c
diff -u php-src/ext/standard/dl.c:1.83 php-src/ext/standard/dl.c:1.84
--- php-src/ext/standard/dl.c:1.83  Tue Jun 10 16:03:37 2003
+++ php-src/ext/standard/dl.c   Sun Aug 17 05:57:21 2003
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: dl.c,v 1.83 2003/06/10 20:03:37 imajes Exp $ */
+/* $Id: dl.c,v 1.84 2003/08/17 09:57:21 david Exp $ */
 
 #include php.h
 #include dl.h
@@ -77,7 +77,7 @@
convert_to_string_ex(file);
 
if (!PG(enable_dl)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Dynamically loaded 
extentions aren't enabled);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Dynamically loaded 
extensions aren't enabled);
} else if (PG(safe_mode)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Dynamically loaded 
extensions aren't allowed when running in Safe Mode);
} 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 parsedate.y

2003-08-17 Thread Derick Rethans
derick  Sun Aug 17 07:49:18 2003 EDT

  Modified files:  
/php-src/ext/standard   parsedate.y 
  Log:
  - Fix the comment too
  
  
Index: php-src/ext/standard/parsedate.y
diff -u php-src/ext/standard/parsedate.y:1.38 php-src/ext/standard/parsedate.y:1.39
--- php-src/ext/standard/parsedate.y:1.38   Sun Aug 17 07:48:29 2003
+++ php-src/ext/standard/parsedate.ySun Aug 17 07:49:18 2003
@@ -8,7 +8,7 @@
 **  This code is in the public domain and has no copyright.
 */
 
-/* $Id: parsedate.y,v 1.38 2003/08/17 11:48:29 derick Exp $ */
+/* $Id: parsedate.y,v 1.39 2003/08/17 11:49:18 derick Exp $ */
 
 #include php.h
 
@@ -150,7 +150,7 @@
 
 %}
 
-/* This grammar has 14 shift/reduce conflicts. */
+/* This grammar has 17 shift/reduce conflicts. */
 %expect 17
 %pure_parser
 



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



[PHP-CVS] cvs: php-src /tests/classes singleton_001.phpt

2003-08-17 Thread Marcus Boerger
helly   Sun Aug 17 08:13:26 2003 EDT

  Modified files:  
/php-src/tests/classes  singleton_001.phpt 
  Log:
  Once is enough
  
Index: php-src/tests/classes/singleton_001.phpt
diff -u php-src/tests/classes/singleton_001.phpt:1.2 
php-src/tests/classes/singleton_001.phpt:1.3
--- php-src/tests/classes/singleton_001.phpt:1.2Sat Aug  9 10:48:47 2003
+++ php-src/tests/classes/singleton_001.phptSun Aug 17 08:13:26 2003
@@ -1,5 +1,5 @@
 --TEST--
-ZE2 ZE2 singleton
+ZE2 singleton
 --SKIPIF--
 ?php if (version_compare(zend_version(), '2.0.0-dev', '')) die('skip ZendEngine 2 
needed'); ?
 --FILE--



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



[PHP-CVS] cvs: php-src /main/streams php_stream_transport.h

2003-08-17 Thread Sascha Schumann
sas Sun Aug 17 09:49:52 2003 EDT

  Modified files:  
/php-src/main/streams   php_stream_transport.h 
  Log:
  One bit fields need to be unsigned, otherwise there is no storage for
  the sign bit

  A signed bit field has a length of 1 bit.
  
  
Index: php-src/main/streams/php_stream_transport.h
diff -u php-src/main/streams/php_stream_transport.h:1.5 
php-src/main/streams/php_stream_transport.h:1.6
--- php-src/main/streams/php_stream_transport.h:1.5 Tue Jul  1 21:35:39 2003
+++ php-src/main/streams/php_stream_transport.h Sun Aug 17 09:49:52 2003
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_stream_transport.h,v 1.5 2003/07/02 01:35:39 wez Exp $ */
+/* $Id: php_stream_transport.h,v 1.6 2003/08/17 13:49:52 sas Exp $ */
 
 #if HAVE_SYS_SOCKET_H
 # include sys/socket.h
@@ -98,9 +98,9 @@
STREAM_XPORT_OP_GET_NAME,
STREAM_XPORT_OP_GET_PEER_NAME
} op;
-   int want_addr:1;
-   int want_textaddr:1;
-   int want_errortext:1;
+   unsigned int want_addr:1;
+   unsigned int want_textaddr:1;
+   unsigned int want_errortext:1;
 
struct {
char *name;



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



[PHP-CVS] cvs: php-src /ext/sqlite/libsqlite/src vdbe.c

2003-08-17 Thread Sascha Schumann
sas Sun Aug 17 10:01:17 2003 EDT

  Modified files:  
/php-src/ext/sqlite/libsqlite/src   vdbe.c 
  Log:
  Use %p to display a pointer value
  
  
Index: php-src/ext/sqlite/libsqlite/src/vdbe.c
diff -u php-src/ext/sqlite/libsqlite/src/vdbe.c:1.3 
php-src/ext/sqlite/libsqlite/src/vdbe.c:1.4
--- php-src/ext/sqlite/libsqlite/src/vdbe.c:1.3 Fri Jun  6 18:44:57 2003
+++ php-src/ext/sqlite/libsqlite/src/vdbe.c Sun Aug 17 10:01:17 2003
@@ -36,7 +36,7 @@
 ** in this file for details.  If in doubt, do not deviate from existing
 ** commenting and indentation practices when changing or adding code.
 **
-** $Id: vdbe.c,v 1.3 2003/06/06 22:44:57 wez Exp $
+** $Id: vdbe.c,v 1.4 2003/08/17 14:01:17 sas Exp $
 */
 #include sqliteInt.h
 #include ctype.h
@@ -1276,7 +1276,7 @@
 sprintf(p-zStack[2],%d, p-aOp[i].p1);
 sprintf(p-zStack[3],%d, p-aOp[i].p2);
 if( p-aOp[i].p3type==P3_POINTER ){
-  sprintf(p-aStack[4].z, ptr(%#x), (int)p-aOp[i].p3);
+  sprintf(p-aStack[4].z, ptr(%p), p-aOp[i].p3);
   p-zStack[4] = p-aStack[4].z;
 }else{
   p-zStack[4] = p-aOp[i].p3;



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



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

2003-08-17 Thread Ard Biesheuvel
abies   Sun Aug 17 12:13:52 2003 EDT

  Modified files:  
/php-src/ext/interbase  interbase.c 
  Log:
  Fixed leak in _php_ibase_bind()
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.150 php-src/ext/interbase/interbase.c:1.151
--- php-src/ext/interbase/interbase.c:1.150 Sun Aug 17 09:16:54 2003
+++ php-src/ext/interbase/interbase.c   Sun Aug 17 12:13:52 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.150 2003/08/17 13:16:54 abies Exp $ */
+/* $Id: interbase.c,v 1.151 2003/08/17 16:13:52 abies Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -262,6 +262,7 @@
 #endif
} val;
short sqlind;
+   void *allocated;
 } BIND_BUF;
 
 /* get blob identifier from argument
@@ -699,7 +700,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, Interbase Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.150 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.151 $);
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, Dynamic Module, Yes);
 #endif
@@ -1319,6 +1320,7 @@
for (i = 0; i  sqlda-sqld; var++, i++) { /* bound vars */

buf[i].sqlind = 0;
+   buf[i].allocated = NULL;
var-sqlind = buf[i].sqlind;
b_var = b_vars[i];

@@ -1462,40 +1464,35 @@
 #endif
break;
case SQL_BLOB:
-   {
-   ibase_blob_handle *ib_blob_id;
+   if (Z_TYPE_P(b_var) != IS_STRING || Z_STRLEN_P(b_var) 
!= sizeof(ibase_blob_handle) || 
+  ((ibase_blob_handle 
*)(Z_STRVAL_P(b_var)))-bl_handle != 0) {
 
-   if (Z_TYPE_P(b_var) != IS_STRING || 
Z_STRLEN_P(b_var) != sizeof(ibase_blob_handle) || 
-  ((ibase_blob_handle 
*)(Z_STRVAL_P(b_var)))-bl_handle != 0) {
-   ibase_blob_handle *ib_blob;
-
-   ib_blob = (ibase_blob_handle *) 
emalloc(sizeof(ibase_blob_handle));
-   ib_blob-trans_handle = 
ib_query-trans;
-   ib_blob-link = ib_query-link;
-   ib_blob-bl_handle = NULL;
-   if (isc_create_blob(IB_STATUS, 
ib_blob-link, ib_blob-trans_handle, ib_blob-bl_handle, ib_blob-bl_qd)) {
-   efree(ib_blob);
-   _php_ibase_error(TSRMLS_C);
-   return FAILURE;
-   }
+   ibase_blob_handle ib_blob;
 
-   if (_php_ibase_blob_add(b_var, 
ib_blob TSRMLS_CC) != SUCCESS) {
-   efree(ib_blob);
-   return FAILURE;
-   }
-   
-   if (isc_close_blob(IB_STATUS, 
ib_blob-bl_handle)) {
-   _php_ibase_error(TSRMLS_C);
-   efree(ib_blob);
-   return FAILURE;
-   }
-   ib_blob_id = ib_blob;
-   } else {
-   ib_blob_id = (ibase_blob_handle *) 
Z_STRVAL_P(b_var);
+   ib_blob.trans_handle = ib_query-trans-handle;
+   ib_blob.link = ib_query-link-handle;
+   ib_blob.bl_handle = NULL;
+
+   if (isc_create_blob(IB_STATUS, ib_blob.link, 
ib_blob.trans_handle, ib_blob.bl_handle, ib_blob.bl_qd)) {
+   _php_ibase_error(TSRMLS_C);
+   return FAILURE;
+   }
+
+   if (_php_ibase_blob_add(b_var, ib_blob 
TSRMLS_CC) != SUCCESS) {
+   return FAILURE;
}
-   var-sqldata = (void ISC_FAR *) 
ib_blob_id-bl_qd;
+   
+   

[PHP-CVS] cvs: php-src /ext/interbase/tests 004.phpt

2003-08-17 Thread Ard Biesheuvel
abies   Sun Aug 17 12:14:29 2003 EDT

  Modified files:  
/php-src/ext/interbase/tests004.phpt 
  Log:
  Test immediate BLOB inserts
  
Index: php-src/ext/interbase/tests/004.phpt
diff -u php-src/ext/interbase/tests/004.phpt:1.7 
php-src/ext/interbase/tests/004.phpt:1.8
--- php-src/ext/interbase/tests/004.phpt:1.7Sun Aug 17 10:58:33 2003
+++ php-src/ext/interbase/tests/004.phptSun Aug 17 12:14:29 2003
@@ -55,14 +55,7 @@
 
 echo create blob 2\n;
 
-$bl_h = ibase_blob_create();
-$ftmp = fopen($name,r);
-while($piece = fread($ftmp, 1 + rand() % 1024)){
-   ibase_blob_add($bl_h, $piece);
-}
-fclose($ftmp);
-$bl_s = ibase_blob_close($bl_h);
-ibase_query(insert into test4 (v_integer, v_blob) values (2, ?), $bl_s);
+ibase_query(insert into test4 (v_integer, v_blob) values (2, ?), $blob_str);
 
 echo test blob 2\n;
 



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



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

2003-08-17 Thread Ard Biesheuvel
abies   Sun Aug 17 12:30:15 2003 EDT

  Modified files:  
/php-src/ext/interbase  interbase.c 
  Log:
  Simplify previous fix
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.151 php-src/ext/interbase/interbase.c:1.152
--- php-src/ext/interbase/interbase.c:1.151 Sun Aug 17 12:13:52 2003
+++ php-src/ext/interbase/interbase.c   Sun Aug 17 12:30:15 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.151 2003/08/17 16:13:52 abies Exp $ */
+/* $Id: interbase.c,v 1.152 2003/08/17 16:30:15 abies Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -262,7 +262,6 @@
 #endif
} val;
short sqlind;
-   void *allocated;
 } BIND_BUF;
 
 /* get blob identifier from argument
@@ -700,7 +699,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, Interbase Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.151 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.152 $);
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, Dynamic Module, Yes);
 #endif
@@ -1320,7 +1319,6 @@
for (i = 0; i  sqlda-sqld; var++, i++) { /* bound vars */

buf[i].sqlind = 0;
-   buf[i].allocated = NULL;
var-sqlind = buf[i].sqlind;
b_var = b_vars[i];

@@ -1486,8 +1484,8 @@
_php_ibase_error(TSRMLS_C);
return FAILURE;
}
-   buf[i].allocated = var-sqldata = (void 
ISC_FAR *) emalloc(sizeof(ISC_QUAD));
-   *(ISC_QUAD ISC_FAR *) var-sqldata = 
ib_blob.bl_qd;
+   buf[i].val.qval = ib_blob.bl_qd;
+   var-sqldata = (void ISC_FAR *) 
buf[i].val.qval;

} else {
var-sqldata = (void ISC_FAR *) 
((ibase_blob_handle *) Z_STRVAL_P(b_var))-bl_qd;
@@ -1727,17 +1725,8 @@
if (in_sqlda) {
efree(in_sqlda);
}
-   if (bind_buf) {
-   int i;
-
-   /* free memory allocated in binding stage */
-   for (i = 0; i  ib_query-in_sqlda-sqld; ++i) {
-   if (bind_buf[i].allocated != NULL) {
-   efree(bind_buf[i].allocated);
-   }
-   }
+   if (bind_buf)
efree(bind_buf);
-   }
 
if (rv == FAILURE) {
if (IB_RESULT) {



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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/interbase/tests 004.phpt

2003-08-17 Thread Ard Biesheuvel
abies   Sun Aug 17 12:40:26 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/interbase/tests004.phpt 
  Log:
  MFH
  
  
Index: php-src/ext/interbase/tests/004.phpt
diff -u php-src/ext/interbase/tests/004.phpt:1.2.4.4 
php-src/ext/interbase/tests/004.phpt:1.2.4.5
--- php-src/ext/interbase/tests/004.phpt:1.2.4.4Sun Aug 17 11:01:07 2003
+++ php-src/ext/interbase/tests/004.phptSun Aug 17 12:40:26 2003
@@ -55,14 +55,7 @@
 
 echo create blob 2\n;
 
-$bl_h = ibase_blob_create();
-$ftmp = fopen($name,r);
-while($piece = fread($ftmp, 1 + rand() % 1024)){
-   ibase_blob_add($bl_h, $piece);
-}
-fclose($ftmp);
-$bl_s = ibase_blob_close($bl_h);
-ibase_query(insert into test4 (v_integer, v_blob) values (2, ?), $bl_s);
+ibase_query(insert into test4 (v_integer, v_blob) values (2, ?), $blob_str);
 
 echo test blob 2\n;
 



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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/interbase interbase.c

2003-08-17 Thread Ard Biesheuvel
abies   Sun Aug 17 12:43:50 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/interbase  interbase.c 
  Log:
  MFH Fixed leak in _php_ibase_bind()
  
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.91.2.18 
php-src/ext/interbase/interbase.c:1.91.2.19
--- php-src/ext/interbase/interbase.c:1.91.2.18 Sun Aug 17 09:26:13 2003
+++ php-src/ext/interbase/interbase.c   Sun Aug 17 12:43:49 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.91.2.18 2003/08/17 13:26:13 abies Exp $ */
+/* $Id: interbase.c,v 1.91.2.19 2003/08/17 16:43:49 abies Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -624,7 +624,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, Interbase Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.91.2.18 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.91.2.19 $);
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, Dynamic Module, yes);
 #endif
@@ -1361,8 +1361,9 @@
efree(ib_blob);
return FAILURE;
}
-   ib_blob_id = ib_blob;
-   var-sqldata = (void ISC_FAR *) 
ib_blob_id-bl_qd;
+   buf[i].val.qval = ib_blob-bl_qd;
+   var-sqldata = (void ISC_FAR *) 
buf[i].val.qval;
+   efree(ib_blob);
 /*
_php_ibase_module_error(Invalid blob 
id string);
return FAILURE;
@@ -2698,6 +2699,7 @@

RETURN_LONG(zend_list_insert(ib_blob, le_blob));
 }
+/* }}} */
 
 /* {{{ proto bool ibase_blob_add(int blob_id, string data)
Add data into created blob */



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



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

2003-08-17 Thread Marcus Boerger
helly   Sun Aug 17 13:14:11 2003 EDT

  Modified files:  
/php-src/ext/dbadba.c 
  Log:
  Fix warning
  
Index: php-src/ext/dba/dba.c
diff -u php-src/ext/dba/dba.c:1.98 php-src/ext/dba/dba.c:1.99
--- php-src/ext/dba/dba.c:1.98  Tue Jul 29 14:26:34 2003
+++ php-src/ext/dba/dba.c   Sun Aug 17 13:14:11 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: dba.c,v 1.98 2003/07/29 18:26:34 iliaa Exp $ */
+/* $Id: dba.c,v 1.99 2003/08/17 17:14:11 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -663,9 +663,9 @@
file_mode = w+b;
break;
default:
-   modenr = 0;
-   lock_mode = 0;
-   file_mode = ;
+   php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), 
Z_STRVAL_PP(args[1]), E_WARNING, Illegal DBA mode);
+   FREENOW;
+   RETURN_FALSE;
}
if (!lock_file_mode) {
lock_file_mode = file_mode;
@@ -694,7 +694,7 @@
lock_mode |= LOCK_NB; /* test =: non blocking */
}
}
-   if (*pmode || !modenr) {
+   if (*pmode) {
php_error_docref2(NULL TSRMLS_CC, Z_STRVAL_PP(args[0]), 
Z_STRVAL_PP(args[1]), E_WARNING, Illegal DBA mode);
FREENOW;
RETURN_FALSE;



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



[PHP-CVS] cvs: php-src / TODO

2003-08-17 Thread Sara Golemon
pollita Sun Aug 17 13:52:20 2003 EDT

  Modified files:  
/php-srcTODO 
  Log:
  No more vectors
  
Index: php-src/TODO
diff -u php-src/TODO:1.153 php-src/TODO:1.154
--- php-src/TODO:1.153  Fri May 30 18:32:37 2003
+++ php-src/TODOSun Aug 17 13:52:20 2003
@@ -133,10 +133,6 @@
 * Provide a callback facility which is executed upon encountering
   an unknown class name during deserialization
 
-ext/sockets

-* Review/Fix vectors
-
 ext/standard
 
 * Add a version number to data serialized via serialize().



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



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

2003-08-17 Thread Marcus Boerger
helly   Sun Aug 17 14:21:35 2003 EDT

  Modified files:  
/php-src/ext/exif   exif.c 
  Log:
  Fix warnings
  
Index: php-src/ext/exif/exif.c
diff -u php-src/ext/exif/exif.c:1.155 php-src/ext/exif/exif.c:1.156
--- php-src/ext/exif/exif.c:1.155   Sun Aug 17 11:04:57 2003
+++ php-src/ext/exif/exif.c Sun Aug 17 14:21:35 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: exif.c,v 1.155 2003/08/17 15:04:57 sas Exp $ */
+/* $Id: exif.c,v 1.156 2003/08/17 18:21:35 helly Exp $ */
 
 /*  ToDos
  *
@@ -111,7 +111,7 @@
 };
 /* }}} */
 
-#define EXIF_VERSION 1.4 $Id: exif.c,v 1.155 2003/08/17 15:04:57 sas Exp $
+#define EXIF_VERSION 1.4 $Id: exif.c,v 1.156 2003/08/17 18:21:35 helly Exp $
 
 /* {{{ PHP_MINFO_FUNCTION
  */
@@ -1313,7 +1313,7 @@
return ;
 }
 
-static const tag_table_type exif_get_tag_table(int section)
+static tag_table_type exif_get_tag_table(int section)
 {
switch(section) {
case SECTION_FILE:  return tag_table_IFD[0];
@@ -1547,7 +1547,7 @@
 /* {{{ exif_iif_add_value
  Add a value to image_info
 */
-static void exif_iif_add_value(image_info_type *image_info, int section_index, char 
*name, int tag, int format, size_t length, void* value, int motorola_intel TSRMLS_DC)
+static void exif_iif_add_value(image_info_type *image_info, int section_index, char 
*name, int tag, int format, int length, void* value, int motorola_intel TSRMLS_DC)
 {
size_t idex;
void *vptr;
@@ -1574,7 +1574,7 @@
if (value) {
length = php_strnlen(value, length);
if (PG(magic_quotes_runtime)) {
-   info_value-s = php_addslashes(value, length, 
(int *) length, 0 TSRMLS_CC);
+   info_value-s = php_addslashes(value, length, 
length, 0 TSRMLS_CC);
} else {
info_value-s = estrndup(value, length);
}
@@ -1601,7 +1601,7 @@
if (value) {
/* do not recompute length here */
if (PG(magic_quotes_runtime)) {
-   info_value-s = php_addslashes(value, length, 
(int *) length, 0 TSRMLS_CC);
+   info_value-s = php_addslashes(value, length, 
length, 0 TSRMLS_CC);
} else {
info_value-s = estrndup(value, length);
}
@@ -1684,7 +1684,7 @@
 */
 static void exif_iif_add_tag(image_info_type *image_info, int section_index, char 
*name, int tag, int format, size_t length, void* value TSRMLS_DC)
 {
-   exif_iif_add_value(image_info, section_index, name, tag, format, length, 
value, image_info-motorola_intel TSRMLS_CC);
+   exif_iif_add_value(image_info, section_index, name, tag, format, (int)length, 
value, image_info-motorola_intel TSRMLS_CC);
 }
 /* }}} */
 
@@ -3004,7 +3004,7 @@
NumDirEntries = php_ifd_get16u(dir_start, ImageInfo-motorola_intel);
 
if ((dir_start+2+NumDirEntries*12)  (offset_base+IFDlength)) {
-   exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, ImageInfo, 
E_WARNING, Illegal IFD size: x%04X + 2 + x%04X*12 = x%04X  x%04X, 
(int)dir_start+2-(int)offset_base, NumDirEntries, 
(int)dir_start+2+NumDirEntries*12-(int)offset_base, IFDlength);
+   exif_error_docref(exif_read_data#error_ifd EXIFERR_CC, ImageInfo, 
E_WARNING, Illegal IFD size: x%04X + 2 + x%04X*12 = x%04X  x%04X, 
(int)((size_t)dir_start+2-(size_t)offset_base), NumDirEntries, 
(int)((size_t)dir_start+2+NumDirEntries*12-(size_t)offset_base), IFDlength);
return FALSE;
}
 
@@ -3201,7 +3201,7 @@
Data[0] = (uchar)lh;
Data[1] = (uchar)ll;
 
-   got = php_stream_read(ImageInfo-infile, Data+2, itemlen-2); /* Read 
the whole section. */
+   got = php_stream_read(ImageInfo-infile, (char*)(Data+2), itemlen-2); 
/* Read the whole section. */
if (got != itemlen-2) {
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, 
Error reading from file: got=x%04X(=%d) != itemlen-2=x%04X(=%d), got, got, 
itemlen-2, itemlen-2);
return FALSE;
@@ -3219,7 +3219,7 @@
size = ImageInfo-FileSize - fpos;
sn = exif_file_sections_add(ImageInfo, 
M_PSEUDO, size, NULL);
Data = ImageInfo-file.list[sn].data;
-   got = php_stream_read(ImageInfo-infile, Data, 
size);
+   got = php_stream_read(ImageInfo-infile, 
(char*)Data, size);
if (got 

[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c

2003-08-17 Thread Marcus Boerger
helly   Sun Aug 17 14:36:27 2003 EDT

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  Fix interactive mode
  
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.239 php-src/sapi/cgi/cgi_main.c:1.240
--- php-src/sapi/cgi/cgi_main.c:1.239   Tue Aug 12 22:01:46 2003
+++ php-src/sapi/cgi/cgi_main.c Sun Aug 17 14:36:27 2003
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.239 2003/08/13 02:01:46 iliaa Exp $ */
+/* $Id: cgi_main.c,v 1.240 2003/08/17 18:36:27 helly Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -922,7 +922,6 @@
char *orig_optarg=optarg;
char *script_file=NULL;
zend_llist global_vars;
-   int interactive=0;
 #if FORCE_CGI_REDIRECT
int force_redirect = 1;
char *redirect_status_env = NULL;
@@ -1312,7 +1311,7 @@
 
case 'a':   /* interactive mode */
printf(Interactive mode enabled\n\n);
-   interactive=1;
+   CG(interactive) = 1;
break;
 
case 'C': /* don't chdir to the script directory */



-- 
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.c

2003-08-17 Thread Marcus Boerger
helly   Sun Aug 17 15:14:30 2003 EDT

  Modified files:  
/php-src/sapi/cli   php_cli.c 
  Log:
  Fix warnings
  
Index: php-src/sapi/cli/php_cli.c
diff -u php-src/sapi/cli/php_cli.c:1.98 php-src/sapi/cli/php_cli.c:1.99
--- php-src/sapi/cli/php_cli.c:1.98 Tue Aug 12 21:29:51 2003
+++ php-src/sapi/cli/php_cli.c  Sun Aug 17 15:14:30 2003
@@ -19,7 +19,7 @@
+--+
 */
 
-/* $Id: php_cli.c,v 1.98 2003/08/13 01:29:51 iliaa Exp $ */
+/* $Id: php_cli.c,v 1.99 2003/08/17 19:14:30 helly Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -418,7 +418,6 @@
efree(*arg);
 }
 
-static php_stream_context *sc_in_process = NULL;
 static php_stream *s_in_process = NULL;
 
 static void cli_register_file_handles(TSRMLS_D)
@@ -440,7 +439,6 @@
return;
}

-   sc_in_process = sc_in;
s_in_process = s_in;
 
php_stream_to_zval(s_in,  zin);
@@ -525,7 +523,6 @@
int lineno = 0;
char *exec_direct=NULL, *exec_run=NULL, *exec_begin=NULL, *exec_end=NULL;
const char *param_error=NULL;
-   int scan_input = 0;
int hide_argv = 0;
 /* end of temporary locals */
 #ifdef ZTS
@@ -801,7 +798,6 @@
param_error = param_mode_conflict;
break;
}
-   scan_input = 1;
behavior=PHP_MODE_PROCESS_STDIN;
exec_end=optarg;
break;



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



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

2003-08-17 Thread Jani Taskinen
sniper  Sun Aug 17 17:27:56 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  fix typo
  
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.352 php-src/NEWS:1.1247.2.353
--- php-src/NEWS:1.1247.2.352   Sun Aug 17 01:57:10 2003
+++ php-src/NEWSSun Aug 17 17:27:55 2003
@@ -6,7 +6,7 @@
   on register_globals). (Ilia)
 - Fixed bug #25081 (odbc_fetch_array() may mangle numeric fields). (Ilia)
 - Fixed bug #25044 (header(Location:) changing HTTP status). (Marcus)
-- Fixed bug #25037 (win23 mail(): Possible infinite loop inside SendText()).
+- Fixed bug #25037 (win32 mail(): Possible infinite loop inside SendText()).
   (Ilia)
 - Fixed bug #25007 (rand()  mt_rand() seed RNG every call). (Jani)
 - Fixed bug #24989 (external libexpat conflicts with bundled libexpat). (Jani)



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



[PHP-CVS] cvs: php-src /ext/interbase interbase.c php_interbase.h

2003-08-17 Thread Ard Biesheuvel
abies   Sun Aug 17 20:14:53 2003 EDT

  Modified files:  
/php-src/ext/interbase  php_interbase.h interbase.c 
  Log:
  Nuke bogus BLOB ids
  # User-space BLOB id no longer contains transaction handle, so BLOB ids
  # now remain valid throughout multiple transactions.
  # Oh, and they look better too :-)
  
  Index: php-src/ext/interbase/php_interbase.h
diff -u php-src/ext/interbase/php_interbase.h:1.52 
php-src/ext/interbase/php_interbase.h:1.53
--- php-src/ext/interbase/php_interbase.h:1.52  Sat Aug 16 11:31:06 2003
+++ php-src/ext/interbase/php_interbase.h   Sun Aug 17 20:14:53 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: php_interbase.h,v 1.52 2003/08/16 15:31:06 abies Exp $ */
+/* $Id: php_interbase.h,v 1.53 2003/08/18 00:14:53 abies Exp $ */
 
 #ifndef PHP_INTERBASE_H
 #define PHP_INTERBASE_H
@@ -114,6 +114,7 @@
char *cfg_timeformat;
char errmsg[MAX_ERRMSG];
long sql_code;
+   HashTable blob_table;
 ZEND_END_MODULE_GLOBALS(ibase)
 
 typedef struct {
@@ -142,10 +143,10 @@
 } ibase_array;
 
 typedef struct {
-   isc_tr_handle trans_handle; 
-   isc_db_handle link;
-   ISC_QUAD bl_qd;
+   ibase_db_link *link;
isc_blob_handle bl_handle;
+   ISC_QUAD bl_qd;
+   unsigned short type;
 } ibase_blob_handle;
 
 typedef struct {
@@ -164,8 +165,8 @@
 } ibase_query;
 
 typedef struct {
-   isc_db_handle link; /* db link for this result */
-   isc_tr_handle trans;
+   ibase_db_link *link;
+   ibase_trans *trans;
isc_stmt_handle stmt;
int drop_stmt;
XSQLDA *out_sqlda;
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.152 php-src/ext/interbase/interbase.c:1.153
--- php-src/ext/interbase/interbase.c:1.152 Sun Aug 17 12:30:15 2003
+++ php-src/ext/interbase/interbase.c   Sun Aug 17 20:14:53 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: interbase.c,v 1.152 2003/08/17 16:30:15 abies Exp $ */
+/* $Id: interbase.c,v 1.153 2003/08/18 00:14:53 abies Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -51,6 +51,9 @@
 
 #define SAFE_STRING(s) ((s)?(s):)
 
+#define BLOB_ID_LEN 18
+#define BLOB_ID_MASK 0x%08lx%08lx
+
 /* {{{ extension definition structures */
 function_entry ibase_functions[] = {
PHP_FE(ibase_connect, NULL)
@@ -264,24 +267,6 @@
short sqlind;
 } BIND_BUF;
 
-/* get blob identifier from argument
- * on empty unset argument ib_blob set to NULL
- */
-static int _php_ibase_get_blob_id(zval **blob_arg, ibase_blob_handle **ib_blob)
-{
-   if (Z_TYPE_PP(blob_arg) == IS_STRING  Z_STRLEN_PP(blob_arg) == 0) {
-   *ib_blob = NULL;
-   } else if (Z_TYPE_PP(blob_arg) != IS_STRING
-|| Z_STRLEN_PP(blob_arg) != sizeof(ibase_blob_handle)
-|| ((ibase_blob_handle *)(Z_STRVAL_PP(blob_arg)))-bl_handle 
!= 0) {
-
-   _php_ibase_module_error(Invalid blob id);
-   return FAILURE;
-   } else {
-   *ib_blob = (ibase_blob_handle *)Z_STRVAL_PP(blob_arg);
-   }
-   return SUCCESS;
-}
 
 /* get blob handle from argument
  * note: blob already open when handle active
@@ -582,7 +567,6 @@
}
_php_ibase_event_free(event-event_buffer,event-result_buffer);
 }
-   
 /* }}} */
 
 /* {{{ startup, shutdown and info functions */
@@ -664,6 +648,8 @@
 
RESET_ERRMSG;
 
+   zend_hash_init(IBG(blob_table), 0, NULL, NULL, 0);
+
return SUCCESS;
 }
 
@@ -690,6 +676,8 @@
}
IBG(timeformat) = NULL;
 
+   zend_hash_destroy(IBG(blob_table));
+   
return SUCCESS;
 } 
  
@@ -699,7 +687,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, Interbase Support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.152 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.153 $);
 #ifdef COMPILE_DL_INTERBASE
php_info_print_table_row(2, Dynamic Module, Yes);
 #endif
@@ -864,15 +852,15 @@
int open_new_connection = 1;

if (zend_hash_find(EG(persistent_list), hashed_details, 
hashed_details_length + 1, (void **) le) != FAILURE) {
-   char tmp_1[] = {isc_info_base_level, isc_info_end};
-   char tmp_2[8]; /* Enough? Hope so... */ 
+   static char info[] = {isc_info_base_level, isc_info_end};
+   char result[8]; /* Enough? Hope so... */ 
 
if (Z_TYPE_P(le) != le_plink) {
RETURN_FALSE;
}
/* Check if connection has timed out */
ib_link = (ibase_db_link *) le-ptr;
-   if (!isc_database_info(IB_STATUS, ib_link-handle, 
sizeof(tmp_1), 

[PHP-CVS] cvs: php-src /ext/com_dotnet com_com.c com_handlers.c com_olechar.c /ext/odbc birdstep.c

2003-08-17 Thread Ilia Alshanetsky
iliaa   Mon Aug 18 00:41:48 2003 EDT

  Modified files:  
/php-src/ext/odbc   birdstep.c 
/php-src/ext/com_dotnet com_handlers.c com_olechar.c com_com.c 
  Log:
  emalloc - safe_emalloc
  
  
Index: php-src/ext/odbc/birdstep.c
diff -u php-src/ext/odbc/birdstep.c:1.8 php-src/ext/odbc/birdstep.c:1.9
--- php-src/ext/odbc/birdstep.c:1.8 Mon Jun 16 12:36:41 2003
+++ php-src/ext/odbc/birdstep.c Mon Aug 18 00:41:47 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: birdstep.c,v 1.8 2003/06/16 16:36:41 andrey Exp $ */
+/* $Id: birdstep.c,v 1.9 2003/08/18 04:41:47 iliaa Exp $ */
 
 /*
  * TODO:
@@ -345,7 +345,7 @@
efree(res);
RETURN_LONG(rows);
} else {  /* Was SELECT query */
-   res-values = (VResVal *)emalloc(sizeof(VResVal)*cols);
+   res-values = (VResVal *)safe_emalloc(sizeof(VResVal), cols, 0);
res-numcols = cols;
for ( i = 0; i  cols; i++ ) {
SQLColAttributes(res-hstmt,i+1,SQL_COLUMN_NAME,
Index: php-src/ext/com_dotnet/com_handlers.c
diff -u php-src/ext/com_dotnet/com_handlers.c:1.1 
php-src/ext/com_dotnet/com_handlers.c:1.2
--- php-src/ext/com_dotnet/com_handlers.c:1.1   Thu Aug 14 12:49:55 2003
+++ php-src/ext/com_dotnet/com_handlers.c   Mon Aug 18 00:41:48 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: com_handlers.c,v 1.1 2003/08/14 16:49:55 wez Exp $ */
+/* $Id: com_handlers.c,v 1.2 2003/08/18 04:41:48 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -353,7 +353,7 @@
nargs = ZEND_NUM_ARGS();
 
if (nargs) {
-   args = (zval **)emalloc(sizeof(zval *) * nargs);
+   args = (zval **)safe_emalloc(sizeof(zval *), nargs, 0);
zend_get_parameters_array(ht, nargs, args);
}
 
Index: php-src/ext/com_dotnet/com_olechar.c
diff -u php-src/ext/com_dotnet/com_olechar.c:1.1 
php-src/ext/com_dotnet/com_olechar.c:1.2
--- php-src/ext/com_dotnet/com_olechar.c:1.1Thu Aug 14 12:49:55 2003
+++ php-src/ext/com_dotnet/com_olechar.cMon Aug 18 00:41:48 2003
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: com_olechar.c,v 1.1 2003/08/14 16:49:55 wez Exp $ */
+/* $Id: com_olechar.c,v 1.2 2003/08/18 04:41:48 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -45,7 +45,7 @@
}
 
if (strlen  0) {
-   olestring = (OLECHAR*)emalloc(sizeof(OLECHAR) * string_len);
+   olestring = (OLECHAR*)safe_emalloc(sizeof(OLECHAR), string_len, 0);
ok = MultiByteToWideChar(codepage, flags, string, string_len, 
olestring, string_len);
} else {
ok = FALSE;
@@ -75,7 +75,7 @@
length = WideCharToMultiByte(codepage, 0, olestring, -1, NULL, 0, NULL, NULL);
 
if (length) {
-   string = (char*)emalloc(sizeof(char) * length);
+   string = (char*)safe_emalloc(sizeof(char), length, 0);
length = WideCharToMultiByte(codepage, 0, olestring, -1, string, 
length, NULL, NULL);
ok = length  0;
} else {
Index: php-src/ext/com_dotnet/com_com.c
diff -u php-src/ext/com_dotnet/com_com.c:1.1 php-src/ext/com_dotnet/com_com.c:1.2
--- php-src/ext/com_dotnet/com_com.c:1.1Thu Aug 14 12:49:55 2003
+++ php-src/ext/com_dotnet/com_com.cMon Aug 18 00:41:48 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: com_com.c,v 1.1 2003/08/14 16:49:55 wez Exp $ */
+/* $Id: com_com.c,v 1.2 2003/08/18 04:41:48 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -373,7 +373,7 @@
int i;
 
if (nargs) {
-   vargs = (VARIANT*)emalloc(sizeof(VARIANT) * nargs);
+   vargs = (VARIANT*)safe_emalloc(sizeof(VARIANT), nargs, 0);
}
 
/* Invoke'd args are in reverse order */



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