[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS /ext/mysqli mysqli.c

2005-04-05 Thread Georg Richter
georg   Wed Apr  6 02:48:14 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-srcNEWS 
/php-src/ext/mysqli mysqli.c 
  Log:
  MFH: fix for #32282 (segfault in mysqli_fetch_array on 64-bit)
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.310&r2=1.1760.2.311&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.310 php-src/NEWS:1.1760.2.311
--- php-src/NEWS:1.1760.2.310   Tue Apr  5 10:48:26 2005
+++ php-src/NEWSWed Apr  6 02:48:12 2005
@@ -8,6 +8,7 @@
   longer then the original string). (Ilia)
 - Fixed bug #32491 (File upload error - unable to create a temporary file).
   (Uwe Schindler)
+- Fixed bug #32282 (Segfault in mysqli_fetch_array on 64-bit) (Georg).
 - Fixed bug #28839 (SIGSEGV in interactive mode (php -a)).
   (kameshj at fastmail dot fm)
 
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.43.2.12&r2=1.43.2.13&ty=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.43.2.12 
php-src/ext/mysqli/mysqli.c:1.43.2.13
--- php-src/ext/mysqli/mysqli.c:1.43.2.12   Sun Mar  6 16:41:38 2005
+++ php-src/ext/mysqli/mysqli.c Wed Apr  6 02:48:13 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>|
   +--+
 
-  $Id: mysqli.c,v 1.43.2.12 2005/03/06 21:41:38 helly Exp $ 
+  $Id: mysqli.c,v 1.43.2.13 2005/04/06 06:48:13 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -582,7 +582,7 @@
 {
MYSQL_RES   *result;
zval*mysql_result;
-   int fetchtype;
+   longfetchtype;
unsigned inti;
MYSQL_FIELD *fields;
MYSQL_ROW   row;

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



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

2005-04-05 Thread Georg Richter
georg   Wed Apr  6 02:47:13 2005 EDT

  Modified files:  
/php-src/ext/mysqli mysqli.c 
  Log:
  fix for bug #32282 (segfault in mysqli_fetch_array on 64-bit)
  
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.62&r2=1.63&ty=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.62 php-src/ext/mysqli/mysqli.c:1.63
--- php-src/ext/mysqli/mysqli.c:1.62Sun Mar  6 16:40:01 2005
+++ php-src/ext/mysqli/mysqli.c Wed Apr  6 02:47:12 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>|
   +--+
 
-  $Id: mysqli.c,v 1.62 2005/03/06 21:40:01 helly Exp $ 
+  $Id: mysqli.c,v 1.63 2005/04/06 06:47:12 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -737,7 +737,7 @@
 {
MYSQL_RES   *result;
zval*mysql_result;
-   int fetchtype;
+   longfetchtype;
unsigned inti;
MYSQL_FIELD *fields;
MYSQL_ROW   row;

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

2005-04-05 Thread Antony Dovgal
tony2001Tue Apr  5 16:32:02 2005 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/ldap   ldap.c 
  Log:
  MFH: remove proto
  
  
http://cvs.php.net/diff.php/php-src/ext/ldap/ldap.c?r1=1.130.2.11&r2=1.130.2.12&ty=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.130.2.11 php-src/ext/ldap/ldap.c:1.130.2.12
--- php-src/ext/ldap/ldap.c:1.130.2.11  Tue Jan 18 19:28:49 2005
+++ php-src/ext/ldap/ldap.c Tue Apr  5 16:32:01 2005
@@ -22,7 +22,7 @@
+--+
  */
  
-/* $Id: ldap.c,v 1.130.2.11 2005/01/19 00:28:49 sniper Exp $ */
+/* $Id: ldap.c,v 1.130.2.12 2005/04/05 20:32:01 tony2001 Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -284,7 +284,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "LDAP Support", "enabled");
-   php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.130.2.11 
2005/01/19 00:28:49 sniper Exp $");
+   php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.130.2.12 
2005/04/05 20:32:01 tony2001 Exp $");
 
if (LDAPG(max_links) == -1) {
snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
@@ -1975,7 +1975,7 @@
 #endif /* (LDAP_API_VERSION > 2000) || HAVE_NSLDAP */
 
 #if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
-/* {{{ proto _ldap_rebind_proc()
+/* {{{ _ldap_rebind_proc()
 */
 int _ldap_rebind_proc(LDAP *ldap, const char *url, ber_tag_t req, ber_int_t 
msgid, void *params)
 {

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



[PHP-CVS] cvs: php-src(PHP_5_0) /ext/ldap ldap.c

2005-04-05 Thread Antony Dovgal
tony2001Tue Apr  5 16:31:38 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-src/ext/ldap   ldap.c 
  Log:
  MFH: remove proto
  
  
http://cvs.php.net/diff.php/php-src/ext/ldap/ldap.c?r1=1.154.2.2&r2=1.154.2.3&ty=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.154.2.2 php-src/ext/ldap/ldap.c:1.154.2.3
--- php-src/ext/ldap/ldap.c:1.154.2.2   Tue Jan 18 19:27:42 2005
+++ php-src/ext/ldap/ldap.c Tue Apr  5 16:31:38 2005
@@ -22,7 +22,7 @@
+--+
  */
  
-/* $Id: ldap.c,v 1.154.2.2 2005/01/19 00:27:42 sniper Exp $ */
+/* $Id: ldap.c,v 1.154.2.3 2005/04/05 20:31:38 tony2001 Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -303,7 +303,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "LDAP Support", "enabled");
-   php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.154.2.2 
2005/01/19 00:27:42 sniper Exp $");
+   php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.154.2.3 
2005/04/05 20:31:38 tony2001 Exp $");
 
if (LDAPG(max_links) == -1) {
snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
@@ -2039,7 +2039,7 @@
 #endif /* (LDAP_API_VERSION > 2000) || HAVE_NSLDAP */
 
 #if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
-/* {{{ proto _ldap_rebind_proc()
+/* {{{ _ldap_rebind_proc()
 */
 int _ldap_rebind_proc(LDAP *ldap, const char *url, ber_tag_t req, ber_int_t 
msgid, void *params)
 {

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



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

2005-04-05 Thread Antony Dovgal
tony2001Tue Apr  5 16:31:13 2005 EDT

  Modified files:  
/php-src/ext/ldap   ldap.c 
  Log:
  remove proto, it's internal func
  
  
http://cvs.php.net/diff.php/php-src/ext/ldap/ldap.c?r1=1.155&r2=1.156&ty=u
Index: php-src/ext/ldap/ldap.c
diff -u php-src/ext/ldap/ldap.c:1.155 php-src/ext/ldap/ldap.c:1.156
--- php-src/ext/ldap/ldap.c:1.155   Tue Jan 18 19:27:21 2005
+++ php-src/ext/ldap/ldap.c Tue Apr  5 16:31:10 2005
@@ -22,7 +22,7 @@
+--+
  */
  
-/* $Id: ldap.c,v 1.155 2005/01/19 00:27:21 sniper Exp $ */
+/* $Id: ldap.c,v 1.156 2005/04/05 20:31:10 tony2001 Exp $ */
 #define IS_EXT_MODULE
 
 #ifdef HAVE_CONFIG_H
@@ -303,7 +303,7 @@
 
php_info_print_table_start();
php_info_print_table_row(2, "LDAP Support", "enabled");
-   php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.155 
2005/01/19 00:27:21 sniper Exp $");
+   php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.156 
2005/04/05 20:31:10 tony2001 Exp $");
 
if (LDAPG(max_links) == -1) {
snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links));
@@ -2039,7 +2039,7 @@
 #endif /* (LDAP_API_VERSION > 2000) || HAVE_NSLDAP */
 
 #if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
-/* {{{ proto _ldap_rebind_proc()
+/* {{{ _ldap_rebind_proc()
 */
 int _ldap_rebind_proc(LDAP *ldap, const char *url, ber_tag_t req, ber_int_t 
msgid, void *params)
 {

-- 
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 /ext/imap php_imap.c

2005-04-05 Thread Ilia Alshanetsky
iliaa   Tue Apr  5 10:49:11 2005 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
/php-src/ext/imap   php_imap.c 
  Log:
  MFH: Fixed bug #32589 (Possible crash inside imap_mail_compose, with 
charsets).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.870&r2=1.1247.2.871&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.870 php-src/NEWS:1.1247.2.871
--- php-src/NEWS:1.1247.2.870   Mon Apr  4 12:30:41 2005
+++ php-src/NEWSTue Apr  5 10:49:09 2005
@@ -3,6 +3,8 @@
 ?? ??? 20??, Version 4.?.?
 - Added the sorting flag SORT_LOCALE_STRING to the sort() functions which makes
   them sort based on the current locale. (Derick)
+- Fixed bug #32589 (Possible crash inside imap_mail_compose, with charsets).
+  (Ilia)
 - Fixed bug #32567 (ext/gmp fails to compile in threadsafe mode). (Tony)
 - Fixed bug #32538 (ext/swf/swf.c does not compile with gcc-3.4.x or newer).
   (adam dot greenfield at gmail dot com)
http://cvs.php.net/diff.php/php-src/ext/imap/php_imap.c?r1=1.142.2.42&r2=1.142.2.43&ty=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.142.2.42 
php-src/ext/imap/php_imap.c:1.142.2.43
--- php-src/ext/imap/php_imap.c:1.142.2.42  Tue Jan 25 09:23:37 2005
+++ php-src/ext/imap/php_imap.c Tue Apr  5 10:49:10 2005
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: php_imap.c,v 1.142.2.42 2005/01/25 14:23:37 tony2001 Exp $ */
+/* $Id: php_imap.c,v 1.142.2.43 2005/04/05 14:49:10 iliaa Exp $ */
 
 #define IMAP41
 
@@ -3015,7 +3015,8 @@
if (zend_hash_find(Z_ARRVAL_PP(data), "charset", 
sizeof("charset"), (void **) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
tmp_param = mail_newbody_parameter();
-   tmp_param->value = cpystr(Z_STRVAL_PP(pvalue));
+   tmp_param->value = (char *) 
fs_get(Z_STRLEN_PP(pvalue) + 1);
+   memcpy(disp_param->value, Z_STRVAL_PP(pvalue), 
Z_STRLEN_PP(pvalue) + 1);
tmp_param->attribute = "CHARSET";
tmp_param->next = bod->parameter;
bod->parameter = tmp_param;

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



[PHP-CVS] cvs: php-src(PHP_5_0) / NEWS /ext/imap php_imap.c

2005-04-05 Thread Ilia Alshanetsky
iliaa   Tue Apr  5 10:48:29 2005 EDT

  Modified files:  (Branch: PHP_5_0)
/php-srcNEWS 
/php-src/ext/imap   php_imap.c 
  Log:
  MFH: Fixed bug #32589 (Possible crash inside imap_mail_compose, with 
charsets).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.309&r2=1.1760.2.310&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1760.2.309 php-src/NEWS:1.1760.2.310
--- php-src/NEWS:1.1760.2.309   Mon Apr  4 14:53:00 2005
+++ php-src/NEWSTue Apr  5 10:48:26 2005
@@ -1,6 +1,8 @@
 PHPNEWS
 |||
 ?? ??? 2005, PHP 5.0.5
+- Fixed bug #32589 (Possible crash inside imap_mail_compose, with charsets).
+  (Ilia)
 - Fixed bug #32560 (configure looks for incorrect db2 library). (Tony)
 - Fixed bug #32530 (chunk_split() does not append endstr if chunklen is  
   longer then the original string). (Ilia)
http://cvs.php.net/diff.php/php-src/ext/imap/php_imap.c?r1=1.184.2.17&r2=1.184.2.18&ty=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.184.2.17 
php-src/ext/imap/php_imap.c:1.184.2.18
--- php-src/ext/imap/php_imap.c:1.184.2.17  Tue Jan 25 09:22:13 2005
+++ php-src/ext/imap/php_imap.c Tue Apr  5 10:48:28 2005
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: php_imap.c,v 1.184.2.17 2005/01/25 14:22:13 tony2001 Exp $ */
+/* $Id: php_imap.c,v 1.184.2.18 2005/04/05 14:48:28 iliaa Exp $ */
 
 #define IMAP41
 
@@ -3045,7 +3045,8 @@
if (zend_hash_find(Z_ARRVAL_PP(data), "charset", 
sizeof("charset"), (void **) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
tmp_param = mail_newbody_parameter();
-   tmp_param->value = cpystr(Z_STRVAL_PP(pvalue));
+   tmp_param->value = (char *) 
fs_get(Z_STRLEN_PP(pvalue) + 1);
+   memcpy(disp_param->value, Z_STRVAL_PP(pvalue), 
Z_STRLEN_PP(pvalue) + 1);
tmp_param->attribute = "CHARSET";
tmp_param->next = bod->parameter;
bod->parameter = tmp_param;

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



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

2005-04-05 Thread Ilia Alshanetsky
iliaa   Tue Apr  5 10:47:48 2005 EDT

  Modified files:  
/php-src/ext/imap   php_imap.c 
  Log:
  Fixed bug #32589 (Possible crash inside imap_mail_compose, with charsets).
  
  
http://cvs.php.net/diff.php/php-src/ext/imap/php_imap.c?r1=1.204&r2=1.205&ty=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.204 php-src/ext/imap/php_imap.c:1.205
--- php-src/ext/imap/php_imap.c:1.204   Sun Feb 20 13:23:33 2005
+++ php-src/ext/imap/php_imap.c Tue Apr  5 10:47:47 2005
@@ -26,7 +26,7 @@
| PHP 4.0 updates:  Zeev Suraski <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: php_imap.c,v 1.204 2005/02/20 18:23:33 iliaa Exp $ */
+/* $Id: php_imap.c,v 1.205 2005/04/05 14:47:47 iliaa Exp $ */
 
 #define IMAP41
 
@@ -3045,7 +3045,8 @@
if (zend_hash_find(Z_ARRVAL_PP(data), "charset", 
sizeof("charset"), (void **) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
tmp_param = mail_newbody_parameter();
-   tmp_param->value = cpystr(Z_STRVAL_PP(pvalue));
+   tmp_param->value = (char *) 
fs_get(Z_STRLEN_PP(pvalue) + 1);
+   memcpy(disp_param->value, Z_STRVAL_PP(pvalue), 
Z_STRLEN_PP(pvalue) + 1);
tmp_param->attribute = "CHARSET";
tmp_param->next = bod->parameter;
bod->parameter = tmp_param;

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



Re: [PHP-CVS] cvs: php-src /ext/spl php_spl.c

2005-04-05 Thread Marcus Boerger
Hello Andrey,

  this happens with any other class/interface we define also. And we've
discussed that before. The result was that we use the names in c we want
and try to do the best common implementation possible to keep everybody
as happy as possible.

Unfortunatley we couldn't add namespaces to php

marcus

Tuesday, April 5, 2005, 5:30:22 AM, you wrote:

>   Marcus,
> isn't this going to blow up existing applications that define class File ?

> Andrey

> Marcus Boerger wrote:
>> helly Tue Apr  5 05:24:53 2005 EDT
>> 
>>   Modified files:  
>> /php-src/ext/spl  php_spl.c 
>>   Log:
>>   - Register class File
>>   - Remove superflous ;
>>   - Stop spl_autoloading on pending exception
>>   
>>   
>> http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.44&r2=1.45&ty=u
>> Index: php-src/ext/spl/php_spl.c
>> diff -u php-src/ext/spl/php_spl.c:1.44 php-src/ext/spl/php_spl.c:1.45
>> --- php-src/ext/spl/php_spl.c:1.44Thu Mar 31 12:17:38 2005
>> +++ php-src/ext/spl/php_spl.c Tue Apr  5 05:24:53 2005
>> @@ -16,7 +16,7 @@
>>
>> +--+
>>   */
>>  
>> -/* $Id: php_spl.c,v 1.44 2005/03/31 17:17:38 helly Exp $ */
>> +/* $Id: php_spl.c,v 1.45 2005/04/05 09:24:53 helly Exp $ */
>>  
>>  #ifdef HAVE_CONFIG_H
>>   #include "config.h"
>> @@ -106,6 +106,7 @@
>>   SPL_ADD_CLASS(DirectoryIterator, z_list, sub, allow, ce_flags); \
>>   SPL_ADD_CLASS(DomainException, z_list, sub, allow, ce_flags); \
>>   SPL_ADD_CLASS(EmptyIterator, z_list, sub, allow, ce_flags); \
>> + SPL_ADD_CLASS(File, z_list, sub, allow, ce_flags); \
>>   SPL_ADD_CLASS(FilterIterator, z_list, sub, allow, ce_flags); \
>>   SPL_ADD_CLASS(InfiniteIterator, z_list, sub, allow, ce_flags); \
>>   SPL_ADD_CLASS(InvalidArgumentException, z_list, sub, allow, ce_flags); 
>> \
>> @@ -148,9 +149,7 @@
>>   zend_file_handle file_handle;
>>   zend_op_array *new_op_array;
>>   zval *result = NULL;
>> - 
>> - ;
>> - 
>> +
>>   class_file_len = spprintf(&class_file, 0, "%s%s", lc_name, 
>> file_extension);
>>  
>>   if (zend_stream_open(class_file, &file_handle TSRMLS_CC) == SUCCESS) {
>> @@ -281,7 +280,7 @@
>>   if (SPL_G(autoload_functions)) {
>>   lc_name = zend_str_tolower_dup(Z_STRVAL_PP(class_name), 
>> Z_STRLEN_PP(class_name));
>>  
>> zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions),
>> &function_pos);
>> -
>> while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions),
>> &function_pos) == SUCCESS) {
>> +
>> while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions),
>> &function_pos) == SUCCESS && !EG(exception)) {
>>  
>> zend_hash_get_current_key_ex(SPL_G(autoload_functions), &func_name,
>> &func_name_len, &dummy, 0, &function_pos);
>>  
>> zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **)
>> &func_ptr_ptr, &function_pos);
>>   zend_call_method(NULL, NULL, func_ptr_ptr,
>> func_name, func_name_len, &retval, 1, *class_name, NULL TSRMLS_CC);
>> 




-- 
Best regards,
 Marcusmailto:[EMAIL PROTECTED]

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



Re: [PHP-CVS] cvs: php-src /ext/spl php_spl.c

2005-04-05 Thread Andrey Hristov
 Marcus,
isn't this going to blow up existing applications that define class File ?
Andrey
Marcus Boerger wrote:
helly   Tue Apr  5 05:24:53 2005 EDT
  Modified files:  
/php-src/ext/spl	php_spl.c 
  Log:
  - Register class File
  - Remove superflous ;
  - Stop spl_autoloading on pending exception
  
  
http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.44&r2=1.45&ty=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.44 php-src/ext/spl/php_spl.c:1.45
--- php-src/ext/spl/php_spl.c:1.44	Thu Mar 31 12:17:38 2005
+++ php-src/ext/spl/php_spl.c	Tue Apr  5 05:24:53 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.44 2005/03/31 17:17:38 helly Exp $ */
+/* $Id: php_spl.c,v 1.45 2005/04/05 09:24:53 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 	#include "config.h"
@@ -106,6 +106,7 @@
 	SPL_ADD_CLASS(DirectoryIterator, z_list, sub, allow, ce_flags); \
 	SPL_ADD_CLASS(DomainException, z_list, sub, allow, ce_flags); \
 	SPL_ADD_CLASS(EmptyIterator, z_list, sub, allow, ce_flags); \
+	SPL_ADD_CLASS(File, z_list, sub, allow, ce_flags); \
 	SPL_ADD_CLASS(FilterIterator, z_list, sub, allow, ce_flags); \
 	SPL_ADD_CLASS(InfiniteIterator, z_list, sub, allow, ce_flags); \
 	SPL_ADD_CLASS(InvalidArgumentException, z_list, sub, allow, ce_flags); \
@@ -148,9 +149,7 @@
 	zend_file_handle file_handle;
 	zend_op_array *new_op_array;
 	zval *result = NULL;
-	
-	;
-	
+
 	class_file_len = spprintf(&class_file, 0, "%s%s", lc_name, file_extension);
 
 	if (zend_stream_open(class_file, &file_handle TSRMLS_CC) == SUCCESS) {
@@ -281,7 +280,7 @@
 	if (SPL_G(autoload_functions)) {
 		lc_name = zend_str_tolower_dup(Z_STRVAL_PP(class_name), Z_STRLEN_PP(class_name));
 		zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), &function_pos);
-		while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions), &function_pos) == SUCCESS) {
+		while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions), &function_pos) == SUCCESS && !EG(exception)) {
 			zend_hash_get_current_key_ex(SPL_G(autoload_functions), &func_name, &func_name_len, &dummy, 0, &function_pos);
 			zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) &func_ptr_ptr, &function_pos);
 			zend_call_method(NULL, NULL, func_ptr_ptr, func_name, func_name_len, &retval, 1, *class_name, NULL TSRMLS_CC);

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


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

2005-04-05 Thread Marcus Boerger
helly   Tue Apr  5 05:24:53 2005 EDT

  Modified files:  
/php-src/ext/splphp_spl.c 
  Log:
  - Register class File
  - Remove superflous ;
  - Stop spl_autoloading on pending exception
  
  
http://cvs.php.net/diff.php/php-src/ext/spl/php_spl.c?r1=1.44&r2=1.45&ty=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.44 php-src/ext/spl/php_spl.c:1.45
--- php-src/ext/spl/php_spl.c:1.44  Thu Mar 31 12:17:38 2005
+++ php-src/ext/spl/php_spl.c   Tue Apr  5 05:24:53 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.44 2005/03/31 17:17:38 helly Exp $ */
+/* $Id: php_spl.c,v 1.45 2005/04/05 09:24:53 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
#include "config.h"
@@ -106,6 +106,7 @@
SPL_ADD_CLASS(DirectoryIterator, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(DomainException, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(EmptyIterator, z_list, sub, allow, ce_flags); \
+   SPL_ADD_CLASS(File, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(FilterIterator, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(InfiniteIterator, z_list, sub, allow, ce_flags); \
SPL_ADD_CLASS(InvalidArgumentException, z_list, sub, allow, ce_flags); \
@@ -148,9 +149,7 @@
zend_file_handle file_handle;
zend_op_array *new_op_array;
zval *result = NULL;
-   
-   ;
-   
+
class_file_len = spprintf(&class_file, 0, "%s%s", lc_name, 
file_extension);
 
if (zend_stream_open(class_file, &file_handle TSRMLS_CC) == SUCCESS) {
@@ -281,7 +280,7 @@
if (SPL_G(autoload_functions)) {
lc_name = zend_str_tolower_dup(Z_STRVAL_PP(class_name), 
Z_STRLEN_PP(class_name));
zend_hash_internal_pointer_reset_ex(SPL_G(autoload_functions), 
&function_pos);
-   while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions), 
&function_pos) == SUCCESS) {
+   while(zend_hash_has_more_elements_ex(SPL_G(autoload_functions), 
&function_pos) == SUCCESS && !EG(exception)) {
zend_hash_get_current_key_ex(SPL_G(autoload_functions), 
&func_name, &func_name_len, &dummy, 0, &function_pos);

zend_hash_get_current_data_ex(SPL_G(autoload_functions), (void **) 
&func_ptr_ptr, &function_pos);
zend_call_method(NULL, NULL, func_ptr_ptr, func_name, 
func_name_len, &retval, 1, *class_name, NULL TSRMLS_CC);

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



[PHP-CVS] cvs: php-src /ext/spl spl_directory.h

2005-04-05 Thread Marcus Boerger
helly   Tue Apr  5 05:23:50 2005 EDT

  Modified files:  
/php-src/ext/splspl_directory.h 
  Log:
  - Use correct var name
  
http://cvs.php.net/diff.php/php-src/ext/spl/spl_directory.h?r1=1.9&r2=1.10&ty=u
Index: php-src/ext/spl/spl_directory.h
diff -u php-src/ext/spl/spl_directory.h:1.9 php-src/ext/spl/spl_directory.h:1.10
--- php-src/ext/spl/spl_directory.h:1.9 Thu Mar 31 16:51:46 2005
+++ php-src/ext/spl/spl_directory.h Tue Apr  5 05:23:50 2005
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_directory.h,v 1.9 2005/03/31 21:51:46 helly Exp $ */
+/* $Id: spl_directory.h,v 1.10 2005/04/05 09:23:50 helly Exp $ */
 
 #ifndef SPL_DIRECTORY_H
 #define SPL_DIRECTORY_H
@@ -26,7 +26,7 @@
 
 extern PHPAPI zend_class_entry *spl_ce_DirectoryIterator;
 extern PHPAPI zend_class_entry *spl_ce_RecursiveDirectoryIterator;
-extern PHPAPI zend_class_entry *spl_ce_FileReader;
+extern PHPAPI zend_class_entry *spl_ce_File;
 
 PHP_MINIT_FUNCTION(spl_directory);
 

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



[PHP-CVS] cvs: php-src /ext/spl/tests spl_autoload_003.phpt

2005-04-05 Thread Marcus Boerger
helly   Tue Apr  5 05:23:17 2005 EDT

  Added files: 
/php-src/ext/spl/tests  spl_autoload_003.phpt 
  Log:
  - Add new test
  

http://cvs.php.net/co.php/php-src/ext/spl/tests/spl_autoload_003.phpt?r=1.1&p=1
Index: php-src/ext/spl/tests/spl_autoload_003.phpt
+++ php-src/ext/spl/tests/spl_autoload_003.phpt
--TEST--
SPL: spl_autoload() and friends
--INI--
include_path=.
--FILE--
getMessage() . "\n";
}

?>
===DONE===

--EXPECTF--
TestFunc1(TestClass)
TestFunc2(TestClass)
Exception: Class TestClass missing
===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/tests/serialize 005.phpt

2005-04-05 Thread Marcus Boerger
helly   Tue Apr  5 05:18:18 2005 EDT

  Modified files:  
/php-src/ext/standard/tests/serialize   005.phpt 
  Log:
  - Add new test
  
http://cvs.php.net/diff.php/php-src/ext/standard/tests/serialize/005.phpt?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/standard/tests/serialize/005.phpt
diff -u /dev/null php-src/ext/standard/tests/serialize/005.phpt:1.3
--- /dev/null   Tue Apr  5 05:18:18 2005
+++ php-src/ext/standard/tests/serialize/005.phpt   Tue Apr  5 05:18:18 2005
@@ -0,0 +1,186 @@
+--TEST--
+serialize()/unserialize() objects
+--SKIPIF--
+
+--FILE--
+
+===DONE===
+
+--EXPECTF--
+===O1===
+TestOld::__sleep()
+string(18) "O:7:"TestOld":0:{}"
+TestOld::__wakeup()
+object(TestOld)#%d (0) {
+}
+===N1===
+TestNew::serialize()
+string(2) "N;"
+NULL
+===N2===
+TestNew::serialize()
+string(19) "C:7:"TestNew":1:{2}"
+TestNew::unserialize()
+object(TestNew)#%d (0) {
+}
+===NAOld===
+unserializer(TestNAOld)
+TestOld::__wakeup()
+object(TestNAOld)#%d (0) {
+}
+===NANew===
+unserializer(TestNANew)
+TestNew::__wakeup()
+object(TestNANew)#%d (0) {
+}
+===NANew2===
+unserializer(TestNANew2)
+TestNew::unserialize()
+object(TestNANew2)#%d (0) {
+}
+===AutoOld===
+unserializer(autoload_implements)
+Try __autoload()
+do_autoload(autoload_interface)
+do_autoload(autoload_implements)
+object(autoload_implements)#%d (0) {
+}
+===AutoNA===
+do_autoload(autoload_not_available)
+unserializer(autoload_not_available)
+Try __autoload()
+do_autoload(autoload_not_available)
+do_autoload(autoload_not_available)
+
+Warning: unserialize(): Function unserializer() hasn't defined the class it 
was called for in %s005.php on line %d
+object(__PHP_Incomplete_Class)#1 (1) {
+  ["__PHP_Incomplete_Class_Name"]=>
+  string(22) "autoload_not_available"
+}
+===DONE===

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