Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/zip config.w32 /ext/zip/lib .cvsignore zip.h zip_close.c zip_dirent.c zip_err_str.c zip_filerange_crc.c zip_get_archive_flag.c zip_open.c zip_rename.c zip_set_

2008-08-08 Thread Hannes Magnusson
2008/8/8 Pierre-Alain Joye <[EMAIL PROTECTED]>:
> pajoye  Thu Aug  7 23:24:11 2008 UTC
>
>  Added files: (Branch: PHP_5_3)
>/php-src/ext/zip/libzip_filerange_crc.c zip_get_archive_flag.c
>zip_set_archive_flag.c
>
>  Modified files:
>/php-src/ext/zipconfig.w32
>/php-src/ext/zip/lib.cvsignore zip.h zip_close.c zip_dirent.c
>zip_err_str.c zip_open.c zip_rename.c
>zip_source_file.c zip_source_filep.c
>zip_source_zip.c zip_unchange_archive.c
>zipint.h
>  Log:
>  - MFH: update to 0.9 (torrentzip support, files open only when necessary), 
> windows fixes

What is "torrentzip" and does that need to be documented?

-Hannes

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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/fbsql .cvsignore CREDITS Readme_w32.txt config.m4 config.w32 fbsql.dsp php_fbsql.c php_fbsql.h

2008-08-08 Thread Hannes Magnusson
On Fri, Aug 8, 2008 at 02:00, Pierre-Alain Joye <[EMAIL PROTECTED]> wrote:
> pajoye  Fri Aug  8 00:00:35 2008 UTC
>
>  Removed files:   (Branch: PHP_5_3)
>/php-src/ext/fbsql  .cvsignore CREDITS Readme_w32.txt config.m4
>config.w32 fbsql.dsp php_fbsql.c php_fbsql.h
>  Log:
>  - moved to PECL

[DOC] ? And on the ext/dbase move?

I may have to borrow some bunnies from Jani...

-Hannes

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



[PHP-CVS] cvs: php-src /ext/standard crypt_freesec.h

2008-08-08 Thread Hannes Magnusson
bjori   Fri Aug  8 08:19:46 2008 UTC

  Modified files:  
/php-src/ext/standard   crypt_freesec.h 
  Log:
  Fix build on FreeBSD4.11 (bug#45757)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.h?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/crypt_freesec.h
diff -u php-src/ext/standard/crypt_freesec.h:1.1 
php-src/ext/standard/crypt_freesec.h:1.2
--- php-src/ext/standard/crypt_freesec.h:1.1Mon Jul 28 11:34:53 2008
+++ php-src/ext/standard/crypt_freesec.hFri Aug  8 08:19:46 2008
@@ -1,10 +1,10 @@
-/* $Id: crypt_freesec.h,v 1.1 2008/07/28 11:34:53 pajoye Exp $ */
+/* $Id: crypt_freesec.h,v 1.2 2008/08/08 08:19:46 bjori Exp $ */
 #ifndef _CRYPT_FREESEC_H
 #define _CRYPT_FREESEC_H
 
 #if PHP_WIN32
 # include "win32/php_stdint.h"
-#else
+#elif HAVE_STDINT_H
 # include 
 #endif
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard crypt_freesec.h

2008-08-08 Thread Hannes Magnusson
bjori   Fri Aug  8 08:20:27 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   crypt_freesec.h 
  Log:
  MFH: Fix build on FreeBSD4.11 (bug#45757)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/crypt_freesec.h?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/standard/crypt_freesec.h
diff -u php-src/ext/standard/crypt_freesec.h:1.1.2.2 
php-src/ext/standard/crypt_freesec.h:1.1.2.3
--- php-src/ext/standard/crypt_freesec.h:1.1.2.2Mon Jul 28 11:50:34 2008
+++ php-src/ext/standard/crypt_freesec.hFri Aug  8 08:20:27 2008
@@ -1,10 +1,10 @@
-/* $Id: crypt_freesec.h,v 1.1.2.2 2008/07/28 11:50:34 pajoye Exp $ */
+/* $Id: crypt_freesec.h,v 1.1.2.3 2008/08/08 08:20:27 bjori Exp $ */
 #ifndef _CRYPT_FREESEC_H
 #define _CRYPT_FREESEC_H
 
 #if PHP_WIN32
 # include "win32/php_stdint.h"
-#else
+#elif HAVE_STDINT_H
 # include 
 #endif
 



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



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/pcre php_pcre.c /ext/pcre/tests bug37911.phpt

2008-08-08 Thread Arnaud Le Blanc
Sorry, I have accidentally committed without log.

This is a MFB of the fix for #37911 which had been fixed in 5.3 but not in 
5.2, fixes #45748.

On Friday 08 August 2008 11:34:08 Arnaud Le Blanc wrote:
> lbarnaud  Fri Aug  8 09:34:08 2008 UTC
>
>   Added files: (Branch: PHP_5_2)
> /php-src/ext/pcre/tests   bug37911.phpt
>
>   Modified files:
> /php-src/ext/pcre php_pcre.c
>   Log:
>
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.25
>&r2=1.168.2.9.2.26&diff_format=u Index: php-src/ext/pcre/php_pcre.c
> diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.25
> php-src/ext/pcre/php_pcre.c:1.168.2.9.2.26 ---
> php-src/ext/pcre/php_pcre.c:1.168.2.9.2.25Wed Feb 20 22:08:18 2008 +++
> php-src/ext/pcre/php_pcre.c   Fri Aug  8 09:34:08 2008
> @@ -16,7 +16,7 @@
>
> +--+ */
>
> -/* $Id: php_pcre.c,v 1.168.2.9.2.25 2008/02/20 22:08:18 felipe Exp $ */
> +/* $Id: php_pcre.c,v 1.168.2.9.2.26 2008/08/08 09:34:08 lbarnaud Exp $ */
>
>  #include "php.h"
>  #include "php_ini.h"
> @@ -174,6 +174,50 @@
>  }
>  /* }}} */
>
> +/* {{{ static make_subpats_table */
> +static char **make_subpats_table(int num_subpats, pcre_cache_entry *pce
> TSRMLS_DC) +{
> + pcre_extra *extra = pce->extra;
> + int name_cnt = 0, name_size, ni = 0;
> + int rc;
> + char *name_table;
> + unsigned short name_idx;
> + char **subpat_names = (char **)ecalloc(num_subpats, sizeof(char *));
> +
> + rc = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMECOUNT, &name_cnt);
> + if (rc < 0) {
> + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal 
> pcre_fullinfo()
> error %d", rc); + efree(subpat_names);
> + return NULL;
> + }
> + if (name_cnt > 0) {
> + int rc1, rc2;
> +
> + rc1 = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMETABLE, 
> &name_table);
> + rc2 = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMEENTRYSIZE,
> &name_size); +rc = rc2 ? rc2 : rc1;
> + if (rc < 0) {
> + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal 
> pcre_fullinfo()
> error %d", rc); + efree(subpat_names);
> + return NULL;
> + }
> +
> + while (ni++ < name_cnt) {
> + name_idx = 0xff * name_table[0] + name_table[1];
> + subpat_names[name_idx] = name_table + 2;
> + if (is_numeric_string(subpat_names[name_idx],
> strlen(subpat_names[name_idx]), NULL, NULL, 0) > 0) {
> + php_error_docref(NULL TSRMLS_CC, E_WARNING, 
> "Numeric named subpatterns
> are not allowed"); +  efree(subpat_names);
> + return NULL;
> + }
> + name_table += name_size;
> + }
> + }
> +
> + return subpat_names;
> +}
> +/* }}} */
> +
>  /* {{{ pcre_get_compiled_regex_cache
>   */
>  PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int
> regex_len TSRMLS_DC) @@ -484,7 +528,7 @@
>   int  g_notempty = 0;/* If the match 
> should not be empty */
>   const char **stringlist;/* Holds list of 
> subpatterns */
>   char*match; /* The current 
> match */
> - char   **subpat_names = NULL;/* Array for named subpatterns 
> */
> + char   **subpat_names;  /* Array for named 
> subpatterns */
>   int  i, rc;
>   int  subpats_order; /* Order of 
> subpattern matches */
>   int  offset_capture;/* Capture match 
> offsets: yes/no */
> @@ -539,54 +583,19 @@
>   }
>   num_subpats++;
>   size_offsets = num_subpats * 3;
> - offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0);
>
>   /*
>* Build a mapping from subpattern numbers to their names. We will 
> always
>* allocate the table, even though there may be no named subpatterns.
> This * avoids somewhat more complicated logic in the inner loops.
>*/
> - subpat_names = (char **)safe_emalloc(num_subpats, sizeof(char *), 0);
> - memset(subpat_names, 0, sizeof(char *) * num_subpats);
> - {
> - int name_cnt = 0, name_size, ni = 0;
> - char *name_table;
> - unsigned short name_idx;
> -
> - rc = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMECOUNT, 
> &name_cnt);
> - if (rc < 0) {
> - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal 
> pcre_fullinfo()
> error %d", rc); - efree(offsets);
> - efree(subpat_names);
> - RETURN_FALSE;
> - }
> - if (nam

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/pcre php_pcre.c /ext/pcre/tests bug37911.phpt

2008-08-08 Thread Arnaud Le Blanc
lbarnaudFri Aug  8 09:34:08 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/pcre/tests bug37911.phpt 

  Modified files:  
/php-src/ext/pcre   php_pcre.c 
  Log:
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.168.2.9.2.25&r2=1.168.2.9.2.26&diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.168.2.9.2.25 
php-src/ext/pcre/php_pcre.c:1.168.2.9.2.26
--- php-src/ext/pcre/php_pcre.c:1.168.2.9.2.25  Wed Feb 20 22:08:18 2008
+++ php-src/ext/pcre/php_pcre.c Fri Aug  8 09:34:08 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.168.2.9.2.25 2008/02/20 22:08:18 felipe Exp $ */
+/* $Id: php_pcre.c,v 1.168.2.9.2.26 2008/08/08 09:34:08 lbarnaud Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -174,6 +174,50 @@
 }
 /* }}} */
 
+/* {{{ static make_subpats_table */
+static char **make_subpats_table(int num_subpats, pcre_cache_entry *pce 
TSRMLS_DC)
+{
+   pcre_extra *extra = pce->extra;
+   int name_cnt = 0, name_size, ni = 0;
+   int rc;
+   char *name_table;
+   unsigned short name_idx;
+   char **subpat_names = (char **)ecalloc(num_subpats, sizeof(char *));
+
+   rc = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMECOUNT, &name_cnt);
+   if (rc < 0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal 
pcre_fullinfo() error %d", rc);
+   efree(subpat_names);
+   return NULL;
+   }
+   if (name_cnt > 0) {
+   int rc1, rc2;
+
+   rc1 = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMETABLE, 
&name_table);
+   rc2 = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMEENTRYSIZE, 
&name_size);
+   rc = rc2 ? rc2 : rc1;
+   if (rc < 0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal 
pcre_fullinfo() error %d", rc);
+   efree(subpat_names);
+   return NULL;
+   }
+
+   while (ni++ < name_cnt) {
+   name_idx = 0xff * name_table[0] + name_table[1];
+   subpat_names[name_idx] = name_table + 2;
+   if (is_numeric_string(subpat_names[name_idx], 
strlen(subpat_names[name_idx]), NULL, NULL, 0) > 0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Numeric named subpatterns are not allowed");
+   efree(subpat_names);
+   return NULL;
+   }
+   name_table += name_size;
+   }
+   }
+
+   return subpat_names;
+}
+/* }}} */
+
 /* {{{ pcre_get_compiled_regex_cache
  */
 PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int 
regex_len TSRMLS_DC)
@@ -484,7 +528,7 @@
int  g_notempty = 0;/* If the match 
should not be empty */
const char **stringlist;/* Holds list of 
subpatterns */
char*match; /* The current 
match */
-   char   **subpat_names = NULL;/* Array for named subpatterns 
*/
+   char   **subpat_names;  /* Array for named 
subpatterns */
int  i, rc;
int  subpats_order; /* Order of 
subpattern matches */
int  offset_capture;/* Capture match 
offsets: yes/no */
@@ -539,54 +583,19 @@
}
num_subpats++;
size_offsets = num_subpats * 3;
-   offsets = (int *)safe_emalloc(size_offsets, sizeof(int), 0);
 
/*
 * Build a mapping from subpattern numbers to their names. We will 
always
 * allocate the table, even though there may be no named subpatterns. 
This
 * avoids somewhat more complicated logic in the inner loops.
 */
-   subpat_names = (char **)safe_emalloc(num_subpats, sizeof(char *), 0);
-   memset(subpat_names, 0, sizeof(char *) * num_subpats);
-   {
-   int name_cnt = 0, name_size, ni = 0;
-   char *name_table;
-   unsigned short name_idx;
-
-   rc = pcre_fullinfo(pce->re, extra, PCRE_INFO_NAMECOUNT, 
&name_cnt);
-   if (rc < 0) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal 
pcre_fullinfo() error %d", rc);
-   efree(offsets);
-   efree(subpat_names);
-   RETURN_FALSE;
-   }
-   if (name_cnt > 0) {
-   int rc1, rc2;
-
-   rc1 = pcre_fullinfo(pce->re, extra, 
PCRE_INFO_NAMETABLE, &name_table);
-   rc2 = pcre_fullinfo(pce->re, extra, 
PCRE_INFO_NAMEENTRYSIZE, &name_size);
-   rc = 

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

2008-08-08 Thread Pierre-Alain Joye
pajoye  Fri Aug  8 09:47:15 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/zipconfig.m4 
  Log:
  - add missing files for 0.9
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/config.m4?r1=1.8.2.3.2.5&r2=1.8.2.3.2.6&diff_format=u
Index: php-src/ext/zip/config.m4
diff -u php-src/ext/zip/config.m4:1.8.2.3.2.5 
php-src/ext/zip/config.m4:1.8.2.3.2.6
--- php-src/ext/zip/config.m4:1.8.2.3.2.5   Mon Jul 14 09:03:48 2008
+++ php-src/ext/zip/config.m4   Fri Aug  8 09:47:15 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.8.2.3.2.5 2008/07/14 09:03:48 jani Exp $
+dnl $Id: config.m4,v 1.8.2.3.2.6 2008/08/08 09:47:15 pajoye Exp $
 dnl
 
 PHP_ARG_ENABLE(zip, for zip archive read/writesupport,
@@ -79,13 +79,15 @@
  lib/zip_error_get_sys_type.c 
lib/zip_file_get_offset.c \
  lib/zip_get_name.c lib/zip_replace.c 
lib/zip_source_function.c \
  lib/zip_unchange.c lib/zip_dirent.c 
lib/zip_error_strerror.c \
- lib/zip_file_strerror.c lib/zip_get_num_files.c \
+ lib/zip_filerange_crc.c lib/zip_file_strerror.c 
lib/zip_get_num_files.c \
+ lib/zip_get_archive_flag.c lib/zip_set_archive_flag.c 
\
  lib/zip_set_name.c lib/zip_source_zip.c 
lib/zip_unchange_data.c \
  lib/zip_entry_free.c lib/zip_error_to_str.c 
lib/zip_fopen.c \
  lib/zip_name_locate.c lib/zip_source_buffer.c 
lib/zip_stat.c \
  lib/zip_entry_new.c lib/zip_err_str.c 
lib/zip_fopen_index.c \
- lib/zip_new.c lib/zip_source_file.c 
lib/zip_stat_index.c lib/zip_get_archive_comment.c \
- lib/zip_get_file_comment.c 
lib/zip_set_archive_comment.c lib/zip_set_file_comment.c \
+ lib/zip_get_archive_comment.c 
lib/zip_get_file_comment.c \
+ lib/zip_new.c lib/zip_source_file.c 
lib/zip_stat_index.c \
+ lib/zip_set_archive_comment.c 
lib/zip_set_file_comment.c \
  lib/zip_unchange_archive.c lib/zip_memdup.c 
lib/zip_stat_init.c lib/zip_add_dir.c \
  lib/zip_error_clear.c lib/zip_file_error_clear.c"
 



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



[PHP-CVS] cvs: php-internals-win /script snap_delete_old.sh

2008-08-08 Thread Pierre-Alain Joye
pajoye  Fri Aug  8 10:01:36 2008 UTC

  Modified files:  
/php-internals-win/script   snap_delete_old.sh 
  Log:
  - plink scripts run on the box, not using remote cmd
  
http://cvs.php.net/viewvc.cgi/php-internals-win/script/snap_delete_old.sh?r1=1.1&r2=1.2&diff_format=u
Index: php-internals-win/script/snap_delete_old.sh
diff -u php-internals-win/script/snap_delete_old.sh:1.1 
php-internals-win/script/snap_delete_old.sh:1.2
--- php-internals-win/script/snap_delete_old.sh:1.1 Thu Aug  7 17:04:33 2008
+++ php-internals-win/script/snap_delete_old.sh Fri Aug  8 10:01:35 2008
@@ -1,14 +1,16 @@
 SSH_DIR="/local/sites/snaps.php.net/www/win32"
 
 cd $SSH_DIR
-for i in "php$VER-win32-2*.zip" "php$VER-dbgpack-win32-2*.zip" 
"pecl$VER-win32-2*.zip" "php$VER-win32-installer-2*.msi"; do
-   list=`ls -r $i 2>/dev/null`
-   cmd="cd $SSH_DIR"
-   count=0
-   for j in $list; do
-   let count=count+1
-   if [ "$count" -gt "5" ]; then
-   cmd="rm -f $j"
-   fi
+for VER in "5.2" "5.3" "6.0"; do
+   for i in "php$VER-win32-2*.zip" "php$VER-dbgpack-win32-2*.zip" 
"pecl$VER-win32-2*.zip" "php$VER-win32-installer-2*.msi"; do
+   list=`ls -r $i 2>/dev/null`
+   cd $SSH_DIR
+   count=0
+   for j in $list; do
+   let count=count+1
+   if [ "$count" -gt "5" ]; then
+   rm -f $j
+   fi
+   done
done
 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_3) /ext/zip php_zip.c

2008-08-08 Thread Antony Dovgal
tony2001Fri Aug  8 10:12:27 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/zipphp_zip.c 
  Log:
  move unused vars into their ifdef
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.38.2.12&r2=1.1.2.38.2.13&diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.1.2.38.2.12 
php-src/ext/zip/php_zip.c:1.1.2.38.2.13
--- php-src/ext/zip/php_zip.c:1.1.2.38.2.12 Fri Jul  4 14:43:53 2008
+++ php-src/ext/zip/php_zip.c   Fri Aug  8 10:12:27 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_zip.c,v 1.1.2.38.2.12 2008/07/04 14:43:53 felipe Exp $ */
+/* $Id: php_zip.c,v 1.1.2.38.2.13 2008/08/08 10:12:27 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -515,9 +515,9 @@
 
 int php_zip_pcre(char *regexp, int regexp_len, char *path, int path_len, zval 
*return_value TSRMLS_DC) /* {{{ */
 {
+#ifdef ZTS
char cwd[MAXPATHLEN];
int cwd_skip = 0;
-#ifdef ZTS
char work_path[MAXPATHLEN];
char *result;
 #endif
@@ -2618,7 +2618,7 @@
php_info_print_table_start();
 
php_info_print_table_row(2, "Zip", "enabled");
-   php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.12 2008/07/04 14:43:53 felipe Exp $");
+   php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.13 2008/08/08 10:12:27 tony2001 Exp $");
php_info_print_table_row(2, "Zip version", "@PACKAGE_VERSION@");
php_info_print_table_row(2, "Libzip version", "0.7.1");
 



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



[PHP-CVS] cvs: php-internals-win /script snapshot.bat

2008-08-08 Thread Pierre-Alain Joye
pajoye  Fri Aug  8 10:12:34 2008 UTC

  Modified files:  
/php-internals-win/script   snapshot.bat 
  Log:
  - add leading zero to the hour, quiet mode for pscp and start a fresh log 
instad of appending to the existing one
  
http://cvs.php.net/viewvc.cgi/php-internals-win/script/snapshot.bat?r1=1.3&r2=1.4&diff_format=u
Index: php-internals-win/script/snapshot.bat
diff -u php-internals-win/script/snapshot.bat:1.3 
php-internals-win/script/snapshot.bat:1.4
--- php-internals-win/script/snapshot.bat:1.3   Thu Aug  7 20:16:01 2008
+++ php-internals-win/script/snapshot.bat   Fri Aug  8 10:12:34 2008
@@ -40,7 +40,7 @@
 
 :CVS
 
-cvs -d :pserver:[EMAIL PROTECTED]:/repository -z3 checkout -r %BRANCH% -d 
%DEST% php5 >> %START%\cvs.log 2<&1
+cvs -d :pserver:[EMAIL PROTECTED]:/repository -z3 checkout -r %BRANCH% -d 
%DEST% php5 > %START%\cvs.log 2<&1
 echo Testing %DEST%...
 IF EXIST %DEST% GOTO DEST_EXISTS 
 ECHO CVS ERROR 
@@ -49,15 +49,15 @@
 
 cd %DEST%
 
-call buildconf.bat >> %START%\buildconf.log 2<&1
+call buildconf.bat > %START%\buildconf.log 2<&1
 call configure.bat --enable-snapshot-build --enable-debug-pack 
--disable-fileinfo --with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared 
--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared 
--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared > 
%START%\compile.log 2<&1
 
-nmake snap >> %START%\compile.log 2<&1
+nmake snap > %START%\compile.log 2<&1
 
 :TRANSFERT
 FOR /F "tokens=*" %%A IN ('Release_TS\\php.exe -r "echo 
substr(phpversion(),0,3);"') DO SET _PHPVERSION_SHORT=%%A
 FOR /F "tokens=*" %%A IN ('Release_TS\\php.exe -r "echo phpversion();"') DO 
SET _PHPVERSION_STRING=%%A
-FOR /F "tokens=*" %%A IN ('Release_TS\\php.exe -r "echo date('YmdGi');"') DO 
SET SNAPDATETIME=%%A
+FOR /F "tokens=*" %%A IN ('Release_TS\\php.exe -r "echo date('YmdHi');"') DO 
SET SNAPDATETIME=%%A
 
 SET PHP_ZIP_FILE=Release_TS\php-%_PHPVERSION_STRING%-Win32.zip
 copy %PHP_ZIP_FILE% %START%\php%_PHPVERSION_SHORT%-win32-%SNAPDATETIME%.zip
@@ -68,16 +68,17 @@
 REM Using -i now
 REM "%PUTTYBASE%pageant.exe" %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk
 "%PUTTYBASE%plink.exe" -batch -l %REMOTE_USER% -m 
%PHP_SDK_PATH%script\snap_delete_old.sh snaps.php.net
-"%PUTTYBASE%pscp.exe" -batch -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk 
-l %REMOTE_USER% 
%START%\php%_PHPVERSION_SHORT%-dbgpack-win32-%SNAPDATETIME%.zip 
%SSH_URL%:%REMOTE_PATH%
-"%PUTTYBASE%pscp.exe" -batch -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk 
-l %REMOTE_USER% %START%\php%_PHPVERSION_SHORT%-win32-%SNAPDATETIME%.zip 
%SSH_URL%:%REMOTE_PATH%
-"%PUTTYBASE%pscp.exe" -batch -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk 
-l %REMOTE_USER% %START%\compile.log 
%SSH_URL%:%REMOTE_PATH%/compile-%_PHPVERSION_SHORT%.log
-"%PUTTYBASE%pscp.exe" -batch -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk 
-l %REMOTE_USER% %START%\cvs.log 
%SSH_URL%:%REMOTE_PATH%/cvs-%_PHPVERSION_SHORT%.log
-"%PUTTYBASE%pscp.exe" -batch -i %PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk 
-l %REMOTE_USER% %START%\buildconf.log 
%SSH_URL%:%REMOTE_PATH%/buildconf-%_PHPVERSION_SHORT%.log
-del %PHP_SDK_PATH%\snaps.lock
+"%PUTTYBASE%pscp.exe" -batch -q -i 
%PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% 
%START%\php%_PHPVERSION_SHORT%-dbgpack-win32-%SNAPDATETIME%.zip 
%SSH_URL%:%REMOTE_PATH%
+"%PUTTYBASE%pscp.exe" -batch -q -i 
%PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% 
%START%\php%_PHPVERSION_SHORT%-win32-%SNAPDATETIME%.zip %SSH_URL%:%REMOTE_PATH%
+"%PUTTYBASE%pscp.exe" -batch -q -i 
%PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% 
%START%\compile.log %SSH_URL%:%REMOTE_PATH%/compile-%_PHPVERSION_SHORT%.log
+"%PUTTYBASE%pscp.exe" -batch -q -i 
%PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% %START%\cvs.log 
%SSH_URL%:%REMOTE_PATH%/cvs-%_PHPVERSION_SHORT%.log
+"%PUTTYBASE%pscp.exe" -batch -q -i 
%PHP_SDK_PATH%keys\pierre_droppederon_prv.ppk -l %REMOTE_USER% 
%START%\buildconf.log %SSH_URL%:%REMOTE_PATH%/buildconf-%_PHPVERSION_SHORT%.log
+
 GOTO EXIT
 
 :HELP
 ECHO snapshot ^ ^ ^
 
 :EXIT
+del %PHP_SDK_PATH%\snaps.lock
 cd %START%



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

2008-08-08 Thread Felix De Vliegher
felixdv Fri Aug  8 10:53:39 2008 UTC

  Modified files:  
/php-src/ext/reflection php_reflection.c 
  Log:
  MFB: Documentation fix for getClosure()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.308&r2=1.309&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.308 
php-src/ext/reflection/php_reflection.c:1.309
--- php-src/ext/reflection/php_reflection.c:1.308   Tue Jul 29 08:48:16 2008
+++ php-src/ext/reflection/php_reflection.c Fri Aug  8 10:53:39 2008
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.308 2008/07/29 08:48:16 tony2001 Exp $ */
+/* $Id: php_reflection.c,v 1.309 2008/08/08 10:53:39 felixdv Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1589,7 +1589,7 @@
 /* }}} */
 
 /* {{{ proto public mixed ReflectionFunction::getClosure()
-   Invokes the function */
+   Returns a dynamically created closure for the function */
 ZEND_METHOD(reflection_function, getClosure)
 {
reflection_object *intern;
@@ -5262,7 +5262,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.308 
2008/07/29 08:48:16 tony2001 Exp $");
+   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.309 
2008/08/08 10:53:39 felixdv Exp $");
 
php_info_print_table_end();
 } /* }}} */



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



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

2008-08-08 Thread Hannes Magnusson
bjori   Fri Aug  8 11:09:31 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  Apparently this is broken in alpha1 too
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.257&r2=1.2027.2.547.2.965.2.258&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.257 
php-src/NEWS:1.2027.2.547.2.965.2.258
--- php-src/NEWS:1.2027.2.547.2.965.2.257   Fri Aug  8 00:01:10 2008
+++ php-src/NEWSFri Aug  8 11:09:31 2008
@@ -13,6 +13,8 @@
 - Fixed a bug causing miscalculations with the "last  of  month"
   relative time string. (Derick)
 
+- Fixed bug #45757 (FreeBSD4.11 build failure: failed include; stdint.h).
+  (Hannes)
 - Fixed bug #45717 (Fileinfo/libmagic build fails, missing err.h and getopt.h).
   (Derick)
 - Fixed bug #45696 (Not all DateTime methods allow method chaining). (Derick)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/reflection/tests ReflectionFunction_getClosure_basic.phpt ReflectionFunction_getClosure_error.phpt ReflectionMethod_getClosure_basic.phpt ReflectionMethod_getClosu

2008-08-08 Thread Felix De Vliegher
felixdv Fri Aug  8 12:39:16 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/reflection/tests   
ReflectionMethod_getClosure_basic.phpt 
ReflectionMethod_getClosure_error.phpt 

ReflectionFunction_getClosure_basic.phpt 

ReflectionFunction_getClosure_error.phpt 
  Log:
  Tests for ReflectionMethod::getClosure() and ReflectionFunction::getClosure() 
  
  

http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt
+++ php-src/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt?view=markup&rev=1.1
Index: php-src/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt
+++ php-src/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/ReflectionFunction_getClosure_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/reflection/tests/ReflectionFunction_getClosure_basic.phpt
+++ php-src/ext/reflection/tests/ReflectionFunction_getClosure_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/ReflectionFunction_getClosure_error.phpt?view=markup&rev=1.1
Index: php-src/ext/reflection/tests/ReflectionFunction_getClosure_error.phpt
+++ php-src/ext/reflection/tests/ReflectionFunction_getClosure_error.phpt



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



[PHP-CVS] cvs: php-src /ext/reflection/tests ReflectionFunction_getClosure_basic.phpt ReflectionFunction_getClosure_error.phpt ReflectionMethod_getClosure_basic.phpt ReflectionMethod_getClosure_error.

2008-08-08 Thread Felix De Vliegher
felixdv Fri Aug  8 12:42:40 2008 UTC

  Modified files:  
/php-src/ext/reflection/tests   
ReflectionMethod_getClosure_basic.phpt 
ReflectionMethod_getClosure_error.phpt 

ReflectionFunction_getClosure_basic.phpt 

ReflectionFunction_getClosure_error.phpt 
  Log:
  MFB: Tests for ReflectionMethod::getClosure() and 
ReflectionFunction::getClosure()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt
diff -u /dev/null 
php-src/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt:1.2
--- /dev/null   Fri Aug  8 12:42:40 2008
+++ php-src/ext/reflection/tests/ReflectionMethod_getClosure_basic.phpt Fri Aug 
 8 12:42:40 2008
@@ -0,0 +1,55 @@
+--TEST--
+Test ReflectionMethod::getClosure() function : basic functionality 
+--FILE--
+bar );
+   }
+}
+
+// Initialize classes
+$class = new ReflectionClass( 'Example' );
+$staticclass = new ReflectionClass( 'StaticExample' );
+$object = new Example();
+$fakeobj = new StdClass();
+
+
+$method = $staticclass->getMethod( 'foo' );
+$closure = $method->getClosure();
+$closure();
+
+$method = $class->getMethod( 'foo' );
+
+$closure = $method->getClosure( $object );
+$closure();
+$object->bar = 34;
+$closure();
+
+?>
+===DONE===
+--EXPECTF--
+*** Testing ReflectionMethod::getClosure() : basic functionality ***
+%unicode|string%(34) "Static Example class, Hello World!"
+%unicode|string%(22) "Example class, bar: 42"
+%unicode|string%(22) "Example class, bar: 34"
+===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt
diff -u /dev/null 
php-src/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt:1.2
--- /dev/null   Fri Aug  8 12:42:40 2008
+++ php-src/ext/reflection/tests/ReflectionMethod_getClosure_error.phpt Fri Aug 
 8 12:42:40 2008
@@ -0,0 +1,73 @@
+--TEST--
+Test ReflectionMethod::getClosure() function : error functionality
+--FILE--
+bar );
+   }
+}
+
+// Initialize classes
+$class = new ReflectionClass( 'Example' );
+$staticclass = new ReflectionClass( 'StaticExample' );
+$method = $class->getMethod( 'foo' );
+$staticmethod = $staticclass->getMethod( 'foo' );
+$object = new Example();
+$fakeobj = new StdClass();
+
+echo "\n-- Testing ReflectionMethod::getClosure() function with more than 
expected no. of arguments --\n";
+var_dump( $staticmethod->getClosure( 'foobar' ) );
+var_dump( $staticmethod->getClosure( 'foo', 'bar' ) );
+var_dump( $method->getClosure( $object, 'foobar' ) );
+
+echo "\n-- Testing ReflectionMethod::getClosure() function with Zero arguments 
--\n";
+$closure = $method->getClosure();
+
+echo "\n-- Testing ReflectionMethod::getClosure() function with Zero arguments 
--\n";
+try {
+var_dump( $method->getClosure( $fakeobj ) );
+} catch( Exception $e ) {
+var_dump( $e->getMessage() );
+}
+
+?>
+===DONE===
+--EXPECTF--
+*** Testing ReflectionMethod::getClosure() : error conditions ***
+
+-- Testing ReflectionMethod::getClosure() function with more than expected no. 
of arguments --
+object(Closure)#%d (0) {
+}
+object(Closure)#%d (0) {
+}
+
+Warning: ReflectionMethod::getClosure() expects exactly 1 parameter, 2 given 
in %s on line %d
+NULL
+
+-- Testing ReflectionMethod::getClosure() function with Zero arguments --
+
+Warning: ReflectionMethod::getClosure() expects exactly 1 parameter, 0 given 
in %s on line %d
+
+-- Testing ReflectionMethod::getClosure() function with Zero arguments --
+%unicode|string%(72) "Given object is not an instance of the class this method 
was declared in"
+===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/ReflectionFunction_getClosure_basic.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/ReflectionFunction_getClosure_basic.phpt
diff -u /dev/null 
php-src/ext/reflection/tests/ReflectionFunction_getClosure_basic.phpt:1.2
--- /dev/null   Fri Aug  8 12:42:40 2008
+++ php-src/ext/reflection/tests/ReflectionFunction_getClosure_basic.phpt   
Fri Aug  8 12:42:40 2008
@@ -0,0 +1,37 @@
+--TEST--
+Test ReflectionFunction::getClosure() function : basic functionality 
+--FILE--
+getClosure();
+$closure();
+
+$func = new ReflectionFunction( 'bar' );
+$closure = $func->getClosure();
+$closure( 'succeeded' );
+
+?>
+===DONE===
+--EXPECTF--
+*** Testing ReflectionFunction::getClosure() : basic functionality ***
+%unicode|string%(19) "Inside foo function"
+%unicode|string%(16) "Arg is succeeded"
+===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/ReflectionFunction_getClosure_error.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/Reflecti

[PHP-CVS] cvs: php-src /main php.h ZendEngine2 zend_execute_API.c

2008-08-08 Thread Marcus Boerger
helly   Fri Aug  8 13:18:31 2008 UTC

  Modified files:  
/ZendEngine2zend_execute_API.c 
/php-src/main   php.h 
  Log:
  - PHP 5.3 todo, store error handling mode on stack when executing internal
or overloaded functions and methods. The issue is that a function might
set and rely on a certain mode and then calls another internal function
which changes it again, probably changing it back to the normal mode.
With this change we need to drop all calls that change the mode back to
normal using php_std_error_handling(). However there might be places
where someone wants to restore the last mode. If there is such a case we
need to add two functions one to save and one to restore. I briefly on
this and not all cases are clear, especially one in sqlite but that seems
to be a rather misleading comment. Eitherway I chose to not drop and mark
as deprecated for now.
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute_API.c?r1=1.456&r2=1.457&diff_format=u
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.456 
ZendEngine2/zend_execute_API.c:1.457
--- ZendEngine2/zend_execute_API.c:1.456Fri Aug  1 14:21:45 2008
+++ ZendEngine2/zend_execute_API.c  Fri Aug  8 13:18:30 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_execute_API.c,v 1.456 2008/08/01 14:21:45 dmitry Exp $ */
+/* $Id: zend_execute_API.c,v 1.457 2008/08/08 13:18:30 helly Exp $ */
 
 #include 
 #include 
@@ -947,12 +947,16 @@
EG(opline_ptr) = original_opline_ptr;
} else if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) 
{
int call_via_handler = 
(EX(function_state).function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) != 0;
+   zend_error_handling_t  error_handling  = EG(error_handling);
+   zend_class_entry  *exception_class = EG(exception_class);
 
ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);
if (EX(function_state).function->common.scope) {
EG(scope) = EX(function_state).function->common.scope;
}
((zend_internal_function *) 
EX(function_state).function)->handler(fci->param_count, *fci->retval_ptr_ptr, 
fci->retval_ptr_ptr, (fci->object_pp?*fci->object_pp:NULL), 1 TSRMLS_CC);
+   EG(error_handling)  = error_handling;
+   EG(exception_class) = exception_class;
/*  We shouldn't fix bad extensions here,
because it can break proper ones (Bug #34045)
if (!EX(function_state).function->common.return_reference)
@@ -969,12 +973,15 @@
fci_cache->initialized = 0;
}
} else { /* ZEND_OVERLOADED_FUNCTION */
-
ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);
 
/* Not sure what should be done here if it's a static 
method */
if (fci->object_pp) {
+   zend_error_handling_t  error_handling  = 
EG(error_handling);
+   zend_class_entry  *exception_class = 
EG(exception_class);

Z_OBJ_HT_PP(fci->object_pp)->call_method(EX(function_state).function->common.function_name,
 fci->param_count, *fci->retval_ptr_ptr, fci->retval_ptr_ptr, *fci->object_pp, 
1 TSRMLS_CC);
+   EG(error_handling)  = error_handling;
+   EG(exception_class) = exception_class;
} else {
zend_error_noreturn(E_ERROR, "Cannot call overloaded 
function for non-object");
}
http://cvs.php.net/viewvc.cgi/php-src/main/php.h?r1=1.244&r2=1.245&diff_format=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.244 php-src/main/php.h:1.245
--- php-src/main/php.h:1.244Tue Jun 24 05:59:11 2008
+++ php-src/main/php.h  Fri Aug  8 13:18:31 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php.h,v 1.244 2008/06/24 05:59:11 kalle Exp $ */
+/* $Id: php.h,v 1.245 2008/08/08 13:18:31 helly Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -287,7 +287,7 @@
 
 BEGIN_EXTERN_C()
 PHPAPI void php_set_error_handling(error_handling_t error_handling, 
zend_class_entry *exception_class TSRMLS_DC);
-#define php_std_error_handling() php_set_error_handling(EH_NORMAL, NULL 
TSRMLS_CC)
+static ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {}
 
 PHPAPI void php_verror(const char *docref, const char *params, int type, const 
char *format, va_list args TSRMLS_DC);
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main php.h ZendEngine2 zend_execute_API.c

2008-08-08 Thread Marcus Boerger
helly   Fri Aug  8 13:21:52 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/ZendEngine2zend_execute_API.c 
/php-src/main   php.h 
  Log:
  - MFH store error handling mode on stack when executing internal
or overloaded functions and methods. [...]
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute_API.c?r1=1.331.2.20.2.24.2.50&r2=1.331.2.20.2.24.2.51&diff_format=u
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.50 
ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.51
--- ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.50 Fri Aug  1 14:22:03 2008
+++ ZendEngine2/zend_execute_API.c  Fri Aug  8 13:21:52 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_execute_API.c,v 1.331.2.20.2.24.2.50 2008/08/01 14:22:03 dmitry 
Exp $ */
+/* $Id: zend_execute_API.c,v 1.331.2.20.2.24.2.51 2008/08/08 13:21:52 helly 
Exp $ */
 
 #include 
 #include 
@@ -890,12 +890,16 @@
EG(opline_ptr) = original_opline_ptr;
} else if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) 
{
int call_via_handler = 
(EX(function_state).function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) != 0;
+   zend_error_handling_t  error_handling  = EG(error_handling);
+   zend_class_entry  *exception_class = EG(exception_class);
 
ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);
if (EX(function_state).function->common.scope) {
EG(scope) = EX(function_state).function->common.scope;
}
((zend_internal_function *) 
EX(function_state).function)->handler(fci->param_count, *fci->retval_ptr_ptr, 
fci->retval_ptr_ptr, (fci->object_pp?*fci->object_pp:NULL), 1 TSRMLS_CC);
+   EG(error_handling)  = error_handling;
+   EG(exception_class) = exception_class;
/*  We shouldn't fix bad extensions here,
because it can break proper ones (Bug #34045)
if (!EX(function_state).function->common.return_reference)
@@ -912,12 +916,15 @@
fci_cache->initialized = 0;
}
} else { /* ZEND_OVERLOADED_FUNCTION */
-
ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);
 
-   /* Not sure what should be done here if it's a static 
method */
+   /* Not sure what should be done here if it's a static method */
if (fci->object_pp) {
+   zend_error_handling_t  error_handling  = 
EG(error_handling);
+   zend_class_entry  *exception_class = 
EG(exception_class);

Z_OBJ_HT_PP(fci->object_pp)->call_method(EX(function_state).function->common.function_name,
 fci->param_count, *fci->retval_ptr_ptr, fci->retval_ptr_ptr, *fci->object_pp, 
1 TSRMLS_CC);
+   EG(error_handling)  = error_handling;
+   EG(exception_class) = exception_class;
} else {
zend_error_noreturn(E_ERROR, "Cannot call overloaded 
function for non-object");
}
http://cvs.php.net/viewvc.cgi/php-src/main/php.h?r1=1.221.2.4.2.8.2.5&r2=1.221.2.4.2.8.2.6&diff_format=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.221.2.4.2.8.2.5 
php-src/main/php.h:1.221.2.4.2.8.2.6
--- php-src/main/php.h:1.221.2.4.2.8.2.5Tue Jun 24 05:59:53 2008
+++ php-src/main/php.h  Fri Aug  8 13:21:52 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php.h,v 1.221.2.4.2.8.2.5 2008/06/24 05:59:53 kalle Exp $ */
+/* $Id: php.h,v 1.221.2.4.2.8.2.6 2008/08/08 13:21:52 helly Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -288,7 +288,7 @@
 
 BEGIN_EXTERN_C()
 PHPAPI void php_set_error_handling(error_handling_t error_handling, 
zend_class_entry *exception_class TSRMLS_DC);
-#define php_std_error_handling() php_set_error_handling(EH_NORMAL, NULL 
TSRMLS_CC)
+static ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {}
 
 PHPAPI void php_verror(const char *docref, const char *params, int type, const 
char *format, va_list args TSRMLS_DC) PHP_ATTRIBUTE_FORMAT(printf, 4, 0);
 



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



[PHP-CVS] cvs: CVSROOT / avail

2008-08-08 Thread Marcus Boerger
helly   Fri Aug  8 13:25:43 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - Upgrade Felix
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1431&r2=1.1432&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1431 CVSROOT/avail:1.1432
--- CVSROOT/avail:1.1431Tue Aug  5 21:25:29 2008
+++ CVSROOT/avail   Fri Aug  8 13:25:41 2008
@@ -55,7 +55,7 @@
 
 # The PHP Quality Assurance Team maintains their own website.
 
-avail|ilia,jalal,zak,andre,lyric,jmoore,ronabop,sebastian,joey,jani,torben,hellekin,cnewbill,bate,yohgaki,jan,imajes,derick,msopacua,nohn,edink,iliaa,helly,sean,nlopess,tony2001,zoe,johannes,lsmith,stevseea|qaweb
+avail|ilia,jalal,zak,andre,lyric,jmoore,ronabop,sebastian,joey,jani,torben,hellekin,cnewbill,bate,yohgaki,jan,imajes,derick,msopacua,nohn,edink,iliaa,helly,sean,nlopess,tony2001,zoe,johannes,lsmith,stevseea,felixdv|qaweb
 
 # Some people get only access to specific languages for phpdoc
 avail|diab,daif,salehcoder|phpdoc-ar
@@ -92,8 +92,7 @@
 
avail|auroraeosrose,ohill,csilles,t2k269,jhannus,moriyoshi,spankin,pqf,lebsack,acmurthy,markus,omar,dsp|pecl
 
 # access to gcov.php.net website.
-
-avail|helly,ilia,nlopess,pronych|php-gcov-web
+avail|helly,ilia,nlopess,pronych,felixdv|php-gcov-web
 
 # The PHP-GTK Group has access to the PHP-GTK code and documentation.
 



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /main php.h ZendEngine2 zend_execute_API.c

2008-08-08 Thread Hannes Magnusson
On Fri, Aug 8, 2008 at 15:21, Marcus Boerger <[EMAIL PROTECTED]> wrote:
> helly   Fri Aug  8 13:21:52 2008 UTC
>
>  Modified files:  (Branch: PHP_5_3)
>/ZendEngine2zend_execute_API.c
>/php-src/main   php.h
>  Log:
>  - MFH store error handling mode on stack when executing internal
>or overloaded functions and methods. [...]
>
>
> http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute_API.c?r1=1.331.2.20.2.24.2.50&r2=1.331.2.20.2.24.2.51&diff_format=u
> Index: ZendEngine2/zend_execute_API.c
> diff -u ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.50 
> ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.51
> --- ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.50 Fri Aug  1 14:22:03 
> 2008
> +++ ZendEngine2/zend_execute_API.c  Fri Aug  8 13:21:52 2008
> @@ -17,7 +17,7 @@
>+--+
>  */
>
> -/* $Id: zend_execute_API.c,v 1.331.2.20.2.24.2.50 2008/08/01 14:22:03 dmitry 
> Exp $ */
> +/* $Id: zend_execute_API.c,v 1.331.2.20.2.24.2.51 2008/08/08 13:21:52 helly 
> Exp $ */
>
>  #include 
>  #include 
> @@ -890,12 +890,16 @@
>EG(opline_ptr) = original_opline_ptr;
>} else if (EX(function_state).function->type == 
> ZEND_INTERNAL_FUNCTION) {
>int call_via_handler = 
> (EX(function_state).function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) != 
> 0;
> +   zend_error_handling_t  error_handling  = EG(error_handling);
> +   zend_class_entry  *exception_class = EG(exception_class);
>
>ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);
>if (EX(function_state).function->common.scope) {
>EG(scope) = EX(function_state).function->common.scope;
>}
>((zend_internal_function *) 
> EX(function_state).function)->handler(fci->param_count, *fci->retval_ptr_ptr, 
> fci->retval_ptr_ptr, (fci->object_pp?*fci->object_pp:NULL), 1 TSRMLS_CC);
> +   EG(error_handling)  = error_handling;
> +   EG(exception_class) = exception_class;
>/*  We shouldn't fix bad extensions here,
>because it can break proper ones (Bug #34045)
>if (!EX(function_state).function->common.return_reference)
> @@ -912,12 +916,15 @@
>fci_cache->initialized = 0;
>}
>} else { /* ZEND_OVERLOADED_FUNCTION */
> -
>ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);
>
> -   /* Not sure what should be done here if it's a static 
> method */
> +   /* Not sure what should be done here if it's a static method 
> */
>if (fci->object_pp) {
> +   zend_error_handling_t  error_handling  = 
> EG(error_handling);
> +   zend_class_entry  *exception_class = 
> EG(exception_class);
>
> Z_OBJ_HT_PP(fci->object_pp)->call_method(EX(function_state).function->common.function_name,
>  fci->param_count, *fci->retval_ptr_ptr, fci->retval_ptr_ptr, 
> *fci->object_pp, 1 TSRMLS_CC);
> +   EG(error_handling)  = error_handling;
> +   EG(exception_class) = exception_class;
>} else {
>zend_error_noreturn(E_ERROR, "Cannot call overloaded 
> function for non-object");
>}
> http://cvs.php.net/viewvc.cgi/php-src/main/php.h?r1=1.221.2.4.2.8.2.5&r2=1.221.2.4.2.8.2.6&diff_format=u
> Index: php-src/main/php.h
> diff -u php-src/main/php.h:1.221.2.4.2.8.2.5 
> php-src/main/php.h:1.221.2.4.2.8.2.6
> --- php-src/main/php.h:1.221.2.4.2.8.2.5Tue Jun 24 05:59:53 2008
> +++ php-src/main/php.h  Fri Aug  8 13:21:52 2008
> @@ -17,7 +17,7 @@
>+--+
>  */
>
> -/* $Id: php.h,v 1.221.2.4.2.8.2.5 2008/06/24 05:59:53 kalle Exp $ */
> +/* $Id: php.h,v 1.221.2.4.2.8.2.6 2008/08/08 13:21:52 helly Exp $ */
>
>  #ifndef PHP_H
>  #define PHP_H
> @@ -288,7 +288,7 @@
>
>  BEGIN_EXTERN_C()
>  PHPAPI void php_set_error_handling(error_handling_t error_handling, 
> zend_class_entry *exception_class TSRMLS_DC);
> -#define php_std_error_handling() php_set_error_handling(EH_NORMAL, NULL 
> TSRMLS_CC)
> +static ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {}

This doesn't look right...

$ sapi/cli/php -r 'try { new DOMAttr();} catch(Exception $e) {} strpos();'

Fatal error: Uncaught exception 'DOMException' with message 'strpos()
expects at least 2 parameters, 0 given' in Command line code:1

-Hannes

-- 
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_012.phpt

2008-08-08 Thread Etienne Kneuss
colder  Fri Aug  8 14:09:16 2008 UTC

  Modified files:  
/php-src/ext/spl/tests  spl_autoload_012.phpt 
  Log:
  Test the catching of chains of exceptions
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/spl_autoload_012.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/spl/tests/spl_autoload_012.phpt
diff -u php-src/ext/spl/tests/spl_autoload_012.phpt:1.1 
php-src/ext/spl/tests/spl_autoload_012.phpt:1.2
--- php-src/ext/spl/tests/spl_autoload_012.phpt:1.1 Sat Jul 12 14:58:07 2008
+++ php-src/ext/spl/tests/spl_autoload_012.phpt Fri Aug  8 14:09:15 2008
@@ -18,13 +18,24 @@
 spl_autoload_register('autoload_first');
 spl_autoload_register('autoload_second');
 
-class_exists('ThisClassDoesNotExist');
+try {
+class_exists('ThisClassDoesNotExist');
+} catch(Exception $e) {
+do {
+echo $e->getMessage()."\n";
+} while($e = $e->getPrevious());
+}
 
+class_exists('ThisClassDoesNotExist');
 ?>
 ===DONE===
 --EXPECTF--
 autoload_first
 autoload_second
+second
+first
+autoload_first
+autoload_second
 
 Fatal error: Uncaught exception 'Exception' with message 'first' in 
%sspl_autoload_012.php:%d
 Stack trace:
@@ -39,4 +50,4 @@
 #1 [internal function]: spl_autoload_call('ThisClassDoesNo...')
 #2 %sspl_autoload_012.php(%d): class_exists('ThisClassDoesNo...')
 #3 {main}
-  thrown in %sspl_autoload_012.php on line %d
\ No newline at end of file
+  thrown in %sspl_autoload_012.php on line %d



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl/tests spl_autoload_012.phpt

2008-08-08 Thread Etienne Kneuss
colder  Fri Aug  8 14:09:45 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/spl/tests  spl_autoload_012.phpt 
  Log:
  MFH: Test the catching of chains of exceptions
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/spl_autoload_012.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/spl/tests/spl_autoload_012.phpt
diff -u php-src/ext/spl/tests/spl_autoload_012.phpt:1.1.2.2 
php-src/ext/spl/tests/spl_autoload_012.phpt:1.1.2.3
--- php-src/ext/spl/tests/spl_autoload_012.phpt:1.1.2.2 Sat Jul 12 14:58:41 2008
+++ php-src/ext/spl/tests/spl_autoload_012.phpt Fri Aug  8 14:09:45 2008
@@ -18,13 +18,24 @@
 spl_autoload_register('autoload_first');
 spl_autoload_register('autoload_second');
 
-class_exists('ThisClassDoesNotExist');
+try {
+class_exists('ThisClassDoesNotExist');
+} catch(Exception $e) {
+do {
+echo $e->getMessage()."\n";
+} while($e = $e->getPrevious());
+}
 
+class_exists('ThisClassDoesNotExist');
 ?>
 ===DONE===
 --EXPECTF--
 autoload_first
 autoload_second
+second
+first
+autoload_first
+autoload_second
 
 Fatal error: Uncaught exception 'Exception' with message 'first' in 
%sspl_autoload_012.php:%d
 Stack trace:
@@ -39,4 +50,4 @@
 #1 [internal function]: spl_autoload_call('ThisClassDoesNo...')
 #2 %sspl_autoload_012.php(%d): class_exists('ThisClassDoesNo...')
 #3 {main}
-  thrown in %sspl_autoload_012.php on line %d
\ No newline at end of file
+  thrown in %sspl_autoload_012.php on line %d



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



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

2008-08-08 Thread Marcus Boerger
helly   Fri Aug  8 14:14:52 2008 UTC

  Modified files:  
/php-src/main   php.h 
  Log:
  - Sorry for the compiler warning
  
http://cvs.php.net/viewvc.cgi/php-src/main/php.h?r1=1.245&r2=1.246&diff_format=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.245 php-src/main/php.h:1.246
--- php-src/main/php.h:1.245Fri Aug  8 13:18:31 2008
+++ php-src/main/php.h  Fri Aug  8 14:14:52 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php.h,v 1.245 2008/08/08 13:18:31 helly Exp $ */
+/* $Id: php.h,v 1.246 2008/08/08 14:14:52 helly Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -287,7 +287,7 @@
 
 BEGIN_EXTERN_C()
 PHPAPI void php_set_error_handling(error_handling_t error_handling, 
zend_class_entry *exception_class TSRMLS_DC);
-static ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {}
+static inline ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {}
 
 PHPAPI void php_verror(const char *docref, const char *params, int type, const 
char *format, va_list args TSRMLS_DC);
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main php.h

2008-08-08 Thread Marcus Boerger
helly   Fri Aug  8 14:15:05 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   php.h 
  Log:
  - MFH: Sorry for the compiler warning
  
http://cvs.php.net/viewvc.cgi/php-src/main/php.h?r1=1.221.2.4.2.8.2.6&r2=1.221.2.4.2.8.2.7&diff_format=u
Index: php-src/main/php.h
diff -u php-src/main/php.h:1.221.2.4.2.8.2.6 
php-src/main/php.h:1.221.2.4.2.8.2.7
--- php-src/main/php.h:1.221.2.4.2.8.2.6Fri Aug  8 13:21:52 2008
+++ php-src/main/php.h  Fri Aug  8 14:15:05 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php.h,v 1.221.2.4.2.8.2.6 2008/08/08 13:21:52 helly Exp $ */
+/* $Id: php.h,v 1.221.2.4.2.8.2.7 2008/08/08 14:15:05 helly Exp $ */
 
 #ifndef PHP_H
 #define PHP_H
@@ -288,7 +288,7 @@
 
 BEGIN_EXTERN_C()
 PHPAPI void php_set_error_handling(error_handling_t error_handling, 
zend_class_entry *exception_class TSRMLS_DC);
-static ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {}
+static inline ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {}
 
 PHPAPI void php_verror(const char *docref, const char *params, int type, const 
char *format, va_list args TSRMLS_DC) PHP_ATTRIBUTE_FORMAT(printf, 4, 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_3) /ext/zip php_zip.c

2008-08-08 Thread Pierre-Alain Joye
pajoye  Fri Aug  8 15:37:38 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/zipphp_zip.c 
  Log:
  - use OPENBASEDIR_CHECKPATH instead of SAFEMODE_CHECKFILE, easier to keep 
code synced with HEAD
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.38.2.13&r2=1.1.2.38.2.14&diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.1.2.38.2.13 
php-src/ext/zip/php_zip.c:1.1.2.38.2.14
--- php-src/ext/zip/php_zip.c:1.1.2.38.2.13 Fri Aug  8 10:12:27 2008
+++ php-src/ext/zip/php_zip.c   Fri Aug  8 15:37:37 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_zip.c,v 1.1.2.38.2.13 2008/08/08 10:12:27 tony2001 Exp $ */
+/* $Id: php_zip.c,v 1.1.2.38.2.14 2008/08/08 15:37:37 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -59,15 +59,6 @@
 #define le_zip_entry_name "Zip Entry"
 /* }}} */
 
-/* {{{ SAFEMODE_CHECKFILE(filename) */
-#if (PHP_MAJOR_VERSION < 6)
-#define SAFEMODE_CHECKFILE(filename) \
-   (PG(safe_mode) && (!php_checkuid(filename, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC)
-#else 
-#define SAFEMODE_CHECKFILE(filename) (0)
-#endif
-/* }}} */
-
 /* {{{ PHP_ZIP_STAT_INDEX(za, index, flags, sb) */
 #define PHP_ZIP_STAT_INDEX(za, index, flags, sb) \
if (zip_stat_index(za, index, flags, &sb) != 0) { \
@@ -142,7 +133,7 @@
 
php_basename(file, file_len, NULL, 0, &file_basename, (unsigned 
int *)&file_basename_len TSRMLS_CC);
 
-   if (SAFEMODE_CHECKFILE(file_dirname_fullpath)) {
+   if (OPENBASEDIR_CHECKPATH(file_dirname_fullpath)) {
efree(file_dirname_fullpath);
efree(file_basename);
return 0;
@@ -191,7 +182,7 @@
 * is required, does a file can have a different
 * safemode status as its parent folder?
 */
-   if (SAFEMODE_CHECKFILE(fullpath)) {
+   if (OPENBASEDIR_CHECKPATH(fullpath)) {
efree(file_dirname_fullpath);
efree(file_basename);
return 0;
@@ -236,7 +227,7 @@
char resolved_path[MAXPATHLEN];
 
 
-   if (SAFEMODE_CHECKFILE(filename)) {
+   if (OPENBASEDIR_CHECKPATH(filename)) {
return -1;
}
 
@@ -1103,7 +1094,7 @@
return;
}
 
-   if (SAFEMODE_CHECKFILE(filename)) {
+   if (OPENBASEDIR_CHECKPATH(filename)) {
RETURN_FALSE;
}
 
@@ -2618,7 +2609,7 @@
php_info_print_table_start();
 
php_info_print_table_row(2, "Zip", "enabled");
-   php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.13 2008/08/08 10:12:27 tony2001 Exp $");
+   php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.14 2008/08/08 15:37:37 pajoye Exp $");
php_info_print_table_row(2, "Zip version", "@PACKAGE_VERSION@");
php_info_print_table_row(2, "Libzip version", "0.7.1");
 



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



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

2008-08-08 Thread Pierre-Alain Joye
pajoye  Fri Aug  8 15:41:25 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/zipphp_zip.c 
  Log:
  - MFH: fix leak in zif_zip_entry_read and ::ExtractTo on Error
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.38.2.14&r2=1.1.2.38.2.15&diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.1.2.38.2.14 
php-src/ext/zip/php_zip.c:1.1.2.38.2.15
--- php-src/ext/zip/php_zip.c:1.1.2.38.2.14 Fri Aug  8 15:37:37 2008
+++ php-src/ext/zip/php_zip.c   Fri Aug  8 15:41:25 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_zip.c,v 1.1.2.38.2.14 2008/08/08 15:37:37 pajoye Exp $ */
+/* $Id: php_zip.c,v 1.1.2.38.2.15 2008/08/08 15:41:25 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1155,7 +1155,7 @@
 
if (ret != 0) {
efree(zr_rsrc);
-   RETURN_LONG((long)ret);
+   RETURN_FALSE;
}
 
zr_rsrc->zf = zip_fopen_index(rsrc_int->za, 
rsrc_int->index_current, 0);
@@ -1163,6 +1163,7 @@
rsrc_int->index_current++;
ZEND_REGISTER_RESOURCE(return_value, zr_rsrc, 
le_zip_entry);
} else {
+   efree(zr_rsrc);
RETURN_FALSE;
}
 
@@ -1244,6 +1245,7 @@
buffer[n] = 0;
RETURN_STRINGL(buffer, n, 0);
} else {
+   efree(buffer);
RETURN_EMPTY_STRING()
}
} else {
@@ -2609,7 +2611,7 @@
php_info_print_table_start();
 
php_info_print_table_row(2, "Zip", "enabled");
-   php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.14 2008/08/08 15:37:37 pajoye Exp $");
+   php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.15 2008/08/08 15:41:25 pajoye Exp $");
php_info_print_table_row(2, "Zip version", "@PACKAGE_VERSION@");
php_info_print_table_row(2, "Libzip version", "0.7.1");
 



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



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

2008-08-08 Thread Pierre-Alain Joye
pajoye  Fri Aug  8 15:52:53 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/zipphp_zip.c php_zip.h 
  Log:
  - MFH: use PHP_ZIP_VERSION_STRING and add add_ascii_assoc_string macro (easy 
sync)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.38.2.15&r2=1.1.2.38.2.16&diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.1.2.38.2.15 
php-src/ext/zip/php_zip.c:1.1.2.38.2.16
--- php-src/ext/zip/php_zip.c:1.1.2.38.2.15 Fri Aug  8 15:41:25 2008
+++ php-src/ext/zip/php_zip.c   Fri Aug  8 15:52:53 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_zip.c,v 1.1.2.38.2.15 2008/08/08 15:41:25 pajoye Exp $ */
+/* $Id: php_zip.c,v 1.1.2.38.2.16 2008/08/08 15:52:53 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -88,9 +88,13 @@
RETURN_FALSE; \
} \
RETURN_TRUE;
-
 /* }}} */
 
+#if (PHP_MAJOR_VERSION < 6)
+# define add_ascii_assoc_string add_assoc_string
+# define add_ascii_assoc_long add_assoc_long
+#endif
+
 #ifdef ZEND_ENGINE_2_1
 /* {{{ php_zip_extract_file */
 /* TODO: Simplify it */
@@ -345,13 +349,13 @@
 #define RETURN_SB(sb) \
{ \
array_init(return_value); \
-   add_assoc_string(return_value, "name", (char *)(sb)->name, 1); \
-   add_assoc_long(return_value, "index", (long) (sb)->index); \
-   add_assoc_long(return_value, "crc", (long) (sb)->crc); \
-   add_assoc_long(return_value, "size", (long) (sb)->size); \
-   add_assoc_long(return_value, "mtime", (long) (sb)->mtime); \
-   add_assoc_long(return_value, "comp_size", (long) 
(sb)->comp_size); \
-   add_assoc_long(return_value, "comp_method", (long) 
(sb)->comp_method); \
+   add_ascii_assoc_string(return_value, "name", (char 
*)(sb)->name, 1); \
+   add_ascii_assoc_long(return_value, "index", (long) 
(sb)->index); \
+   add_ascii_assoc_long(return_value, "crc", (long) (sb)->crc); \
+   add_ascii_assoc_long(return_value, "size", (long) (sb)->size); \
+   add_ascii_assoc_long(return_value, "mtime", (long) 
(sb)->mtime); \
+   add_ascii_assoc_long(return_value, "comp_size", (long) 
(sb)->comp_size); \
+   add_ascii_assoc_long(return_value, "comp_method", (long) 
(sb)->comp_method); \
}
 /* }}} */
 
@@ -1071,7 +1075,7 @@
NULL,
NULL,
PHP_MINFO(zip),
-   "@PACKAGE_VERSION@",
+   PHP_ZIP_VERSION_STRING,
STANDARD_MODULE_PROPERTIES
 };
 /* }}} */
@@ -2611,8 +2615,8 @@
php_info_print_table_start();
 
php_info_print_table_row(2, "Zip", "enabled");
-   php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.15 2008/08/08 15:41:25 pajoye Exp $");
-   php_info_print_table_row(2, "Zip version", "@PACKAGE_VERSION@");
+   php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.16 2008/08/08 15:52:53 pajoye Exp $");
+   php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION_STRING);
php_info_print_table_row(2, "Libzip version", "0.7.1");
 
php_info_print_table_end();
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.h?r1=1.10.2.3.2.5&r2=1.10.2.3.2.6&diff_format=u
Index: php-src/ext/zip/php_zip.h
diff -u php-src/ext/zip/php_zip.h:1.10.2.3.2.5 
php-src/ext/zip/php_zip.h:1.10.2.3.2.6
--- php-src/ext/zip/php_zip.h:1.10.2.3.2.5  Fri Jul  4 14:50:07 2008
+++ php-src/ext/zip/php_zip.h   Fri Aug  8 15:52:53 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_zip.h,v 1.10.2.3.2.5 2008/07/04 14:50:07 felipe Exp $ */
+/* $Id: php_zip.h,v 1.10.2.3.2.6 2008/08/08 15:52:53 pajoye Exp $ */
 
 #ifndef PHP_ZIP_H
 #define PHP_ZIP_H
@@ -36,6 +36,8 @@
 
 #include "lib/zip.h"
 
+#define PHP_ZIP_VERSION_STRING "1.8.11"
+
 #ifndef ZEND_ENGINE_2_1
 # if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 0) || PHP_MAJOR_VERSION == 
6
 #  define ZEND_ENGINE_2_1
@@ -53,7 +55,7 @@
 #if (PHP_MAJOR_VERSION < 6)
 #define OPENBASEDIR_CHECKPATH(filename) \
(PG(safe_mode) && (!php_checkuid(filename, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC)
-#else 
+#else
 #define OPENBASEDIR_CHECKPATH(filename) \
php_check_open_basedir(filename TSRMLS_CC)
 #endif



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



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

2008-08-08 Thread Pierre-Alain Joye
pajoye  Fri Aug  8 15:56:44 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/zipphp_zip.c 
  Log:
  - MFH: missing openbasedir check
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.38.2.16&r2=1.1.2.38.2.17&diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.1.2.38.2.16 
php-src/ext/zip/php_zip.c:1.1.2.38.2.17
--- php-src/ext/zip/php_zip.c:1.1.2.38.2.16 Fri Aug  8 15:52:53 2008
+++ php-src/ext/zip/php_zip.c   Fri Aug  8 15:56:44 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_zip.c,v 1.1.2.38.2.16 2008/08/08 15:52:53 pajoye Exp $ */
+/* $Id: php_zip.c,v 1.1.2.38.2.17 2008/08/08 15:56:44 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1383,6 +1383,10 @@
RETURN_FALSE;
}
 
+   if (OPENBASEDIR_CHECKPATH(filename)) {
+   RETURN_FALSE;
+   }
+
if (!expand_filepath(filename, resolved_path TSRMLS_CC)) {
RETURN_FALSE;
}
@@ -2615,7 +2619,7 @@
php_info_print_table_start();
 
php_info_print_table_row(2, "Zip", "enabled");
-   php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.16 2008/08/08 15:52:53 pajoye Exp $");
+   php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.17 2008/08/08 15:56:44 pajoye Exp $");
php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION_STRING);
php_info_print_table_row(2, "Libzip version", "0.7.1");
 



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



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

2008-08-08 Thread Pierre-Alain Joye
pajoye  Fri Aug  8 16:05:38 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/zipphp_zip.c 
  Log:
  - MFH: constify zend_function_entry and update phpinfo
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.38.2.17&r2=1.1.2.38.2.18&diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.1.2.38.2.17 
php-src/ext/zip/php_zip.c:1.1.2.38.2.18
--- php-src/ext/zip/php_zip.c:1.1.2.38.2.17 Fri Aug  8 15:56:44 2008
+++ php-src/ext/zip/php_zip.c   Fri Aug  8 16:05:38 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_zip.c,v 1.1.2.38.2.17 2008/08/08 15:56:44 pajoye Exp $ */
+/* $Id: php_zip.c,v 1.1.2.38.2.18 2008/08/08 16:05:38 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -2482,7 +2482,7 @@
 /* }}} */
 
 /* {{{ ze_zip_object_class_functions */
-static zend_function_entry zip_class_functions[] = {
+static const zend_function_entry zip_class_functions[] = {
ZIPARCHIVE_ME(open, NULL, ZEND_ACC_PUBLIC)
ZIPARCHIVE_ME(close,NULL, ZEND_ACC_PUBLIC)
ZIPARCHIVE_ME(getStatusString,  NULL, ZEND_ACC_PUBLIC)
@@ -2619,9 +2619,9 @@
php_info_print_table_start();
 
php_info_print_table_row(2, "Zip", "enabled");
-   php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.17 2008/08/08 15:56:44 pajoye Exp $");
+   php_info_print_table_row(2, "Extension Version","$Id: php_zip.c,v 
1.1.2.38.2.18 2008/08/08 16:05:38 pajoye Exp $");
php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION_STRING);
-   php_info_print_table_row(2, "Libzip version", "0.7.1");
+   php_info_print_table_row(2, "Libzip version", "0.9.0");
 
php_info_print_table_end();
 }



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



[PHP-CVS] cvs: php-src /ext/zip config.m4 config.w32 php_zip.c php_zip.h

2008-08-08 Thread Pierre-Alain Joye
pajoye  Fri Aug  8 18:13:55 2008 UTC

  Modified files:  
/php-src/ext/zipconfig.m4 config.w32 php_zip.c php_zip.h 
  Log:
  - sync with 5.3
  http://cvs.php.net/viewvc.cgi/php-src/ext/zip/config.m4?r1=1.14&r2=1.15&diff_format=u
Index: php-src/ext/zip/config.m4
diff -u php-src/ext/zip/config.m4:1.14 php-src/ext/zip/config.m4:1.15
--- php-src/ext/zip/config.m4:1.14  Mon Jul 14 09:05:09 2008
+++ php-src/ext/zip/config.m4   Fri Aug  8 18:13:55 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.14 2008/07/14 09:05:09 jani Exp $
+dnl $Id: config.m4,v 1.15 2008/08/08 18:13:55 pajoye Exp $
 dnl
 
 PHP_ARG_ENABLE(zip, for zip archive read/writesupport,
@@ -10,6 +10,9 @@
   [  --with-zlib-dir[=DIR] ZIP: Set the path to libz install prefix], no, 
no)
 fi
 
+PHP_ARG_WITH(pcre-dir, pcre install prefix,
+[  --with-pcre-dir   ZIP: pcre install prefix], no, no)
+
 if test "$PHP_ZIP" != "no"; then
 
   if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then
@@ -44,6 +47,30 @@
 PHP_ADD_INCLUDE($PHP_ZLIB_INCDIR)
   fi
 
+  dnl This is PECL build, check if bundled PCRE library is used
+  old_CPPFLAGS=$CPPFLAGS
+  CPPFLAGS=$INCLUDES
+  AC_EGREP_CPP(yes,[
+#include 
+#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE)
+yes
+#endif
+  ],[
+PHP_PCRE_REGEX=yes
+  ],[
+AC_EGREP_CPP(yes,[
+#include 
+#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE)
+yes
+#endif
+],[
+  PHP_PCRE_REGEX=pecl
+],[
+  PHP_PCRE_REGEX=no
+])
+  ])
+  CPPFLAGS=$old_CPPFLAGS
+
   PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c 
lib/zip_fclose.c \
  lib/zip_fread.c lib/zip_open.c lib/zip_source_filep.c 
 \
  lib/zip_strerror.c lib/zip_close.c 
lib/zip_error_get.c \
@@ -66,4 +93,7 @@
   PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c $PHP_ZIP_SOURCES, $ext_shared)
   PHP_ADD_BUILD_DIR($ext_builddir/lib, 1)
   PHP_SUBST(ZIP_SHARED_LIBADD)
+
+  dnl so we always include the known-good working hack.
+  PHP_ADD_MAKEFILE_FRAGMENT
 fi
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/config.w32?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/zip/config.w32
diff -u php-src/ext/zip/config.w32:1.6 php-src/ext/zip/config.w32:1.7
--- php-src/ext/zip/config.w32:1.6  Thu Aug  7 23:23:19 2008
+++ php-src/ext/zip/config.w32  Fri Aug  8 18:13:55 2008
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.6 2008/08/07 23:23:19 pajoye Exp $
+// $Id: config.w32,v 1.7 2008/08/08 18:13:55 pajoye Exp $
 // vim:ft=javascript
 
 ARG_ENABLE("zip", "ZIP support", "yes");
@@ -28,6 +28,7 @@
  zip_set_archive_comment.c zip_set_file_comment.c \
  zip_unchange_archive.c zip_memdup.c zip_stat_init.c \
  zip_add_dir.c zip_file_error_clear.c zip_error_clear.c", 
"zip");
+
AC_DEFINE('HAVE_ZIP', 1);
} else {
WARNING("zip not enabled; libraries and headers not found");
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.59&r2=1.60&diff_format=u
Index: php-src/ext/zip/php_zip.c
diff -u php-src/ext/zip/php_zip.c:1.59 php-src/ext/zip/php_zip.c:1.60
--- php-src/ext/zip/php_zip.c:1.59  Thu Jul  3 12:21:25 2008
+++ php-src/ext/zip/php_zip.c   Fri Aug  8 18:13:55 2008
@@ -12,11 +12,11 @@
   | obtain it through the world-wide-web, please send a note to  |
   | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
   +--+
-  | Author: Piere-Alain Joye <[EMAIL PROTECTED] |
+  | Author: Piere-Alain Joye <[EMAIL PROTECTED]>|
   +--+
 */
 
-/* $Id: php_zip.c,v 1.59 2008/07/03 12:21:25 felipe Exp $ */
+/* $Id: php_zip.c,v 1.60 2008/08/08 18:13:55 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -27,6 +27,7 @@
 #include "ext/standard/info.h"
 #include "ext/standard/file.h"
 #include "ext/standard/php_string.h"
+#include "ext/pcre/php_pcre.h"
 #include "php_zip.h"
 #include "lib/zip.h"
 #include "lib/zipint.h"
@@ -43,6 +44,14 @@
 static PHP_NAMED_FUNCTION(zif_zip_entry_open);
 static PHP_NAMED_FUNCTION(zif_zip_entry_close);
 
+#ifdef HAVE_GLOB
+#ifndef PHP_WIN32
+#include 
+#else
+#include "win32/glob.h"
+#endif
+#endif
+
 /* {{{ Resource le */
 static int le_zip_dir;
 #define le_zip_dir_name "Zip Directory"
@@ -63,7 +72,7 @@
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Empty string as 
entry name"); \
RETURN_FALSE; \
} \
-   if (zip_stat(za, path, flags, &sb) == -1) { \
+   if (zip_stat(za, path, flags, &sb) != 0) { \
RETURN_FALSE; \
}
 /* }}} */
@@ -107,13 +116,12 @@
if (file_len >= MAXPATHLEN || zip_stat(za, file, 0, &sb) != 0) {
return 0;
}
-
+   /* it is a directory only, see #40228 */
if (file_len > 1 && file

[PHP-CVS] cvs: php-src /ext/zip config.m4

2008-08-08 Thread Pierre-Alain Joye
pajoye  Fri Aug  8 18:29:51 2008 UTC

  Modified files:  
/php-src/ext/zipconfig.m4 
  Log:
  - MFB: add new files
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/config.m4?r1=1.15&r2=1.16&diff_format=u
Index: php-src/ext/zip/config.m4
diff -u php-src/ext/zip/config.m4:1.15 php-src/ext/zip/config.m4:1.16
--- php-src/ext/zip/config.m4:1.15  Fri Aug  8 18:13:55 2008
+++ php-src/ext/zip/config.m4   Fri Aug  8 18:29:51 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.15 2008/08/08 18:13:55 pajoye Exp $
+dnl $Id: config.m4,v 1.16 2008/08/08 18:29:51 pajoye Exp $
 dnl
 
 PHP_ARG_ENABLE(zip, for zip archive read/writesupport,
@@ -79,7 +79,8 @@
  lib/zip_error_get_sys_type.c 
lib/zip_file_get_offset.c \
  lib/zip_get_name.c lib/zip_replace.c 
lib/zip_source_function.c \
  lib/zip_unchange.c lib/zip_dirent.c 
lib/zip_error_strerror.c \
- lib/zip_file_strerror.c lib/zip_get_num_files.c \
+ lib/zip_filerange_crc.c lib/zip_file_strerror.c 
lib/zip_get_num_files.c \
+ lib/zip_get_archive_flag.c lib/zip_set_archive_flag.c 
\
  lib/zip_set_name.c lib/zip_source_zip.c 
lib/zip_unchange_data.c \
  lib/zip_entry_free.c lib/zip_error_to_str.c 
lib/zip_fopen.c \
  lib/zip_name_locate.c lib/zip_source_buffer.c 
lib/zip_stat.c \



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /main php.h ZendEngine2 zend_execute_API.c

2008-08-08 Thread Marcus Boerger
Hello Hannes,

Friday, August 8, 2008, 3:57:16 PM, you wrote:

> On Fri, Aug 8, 2008 at 15:21, Marcus Boerger <[EMAIL PROTECTED]> wrote:
>> helly   Fri Aug  8 13:21:52 2008 UTC
>>
>>  Modified files:  (Branch: PHP_5_3)
>>/ZendEngine2zend_execute_API.c
>>/php-src/main   php.h
>>  Log:
>>  - MFH store error handling mode on stack when executing internal
>>or overloaded functions and methods. [...]
>>
>>
>> http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute_API.c?r1=1.331.2.20.2.24.2.50&r2=1.331.2.20.2.24.2.51&diff_format=u
>> Index: ZendEngine2/zend_execute_API.c
>> diff -u ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.50 
>> ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.51
>> --- ZendEngine2/zend_execute_API.c:1.331.2.20.2.24.2.50 Fri Aug  1 14:22:03 
>> 2008
>> +++ ZendEngine2/zend_execute_API.c  Fri Aug  8 13:21:52 2008
>> @@ -17,7 +17,7 @@
>>+--+
>>  */
>>
>> -/* $Id: zend_execute_API.c,v 1.331.2.20.2.24.2.50 2008/08/01 14:22:03 
>> dmitry Exp $ */
>> +/* $Id: zend_execute_API.c,v 1.331.2.20.2.24.2.51 2008/08/08 13:21:52 helly 
>> Exp $ */
>>
>>  #include 
>>  #include 
>> @@ -890,12 +890,16 @@
>>EG(opline_ptr) = original_opline_ptr;
>>} else if (EX(function_state).function->type == 
>> ZEND_INTERNAL_FUNCTION) {
>>int call_via_handler = 
>> (EX(function_state).function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) 
>> != 0;
>> +   zend_error_handling_t  error_handling  = EG(error_handling);
>> +   zend_class_entry  *exception_class = EG(exception_class);
>>
>>ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);
>>if (EX(function_state).function->common.scope) {
>>EG(scope) = EX(function_state).function->common.scope;
>>}
>>((zend_internal_function *) 
>> EX(function_state).function)->handler(fci->param_count, 
>> *fci->retval_ptr_ptr, fci->retval_ptr_ptr, 
>> (fci->object_pp?*fci->object_pp:NULL), 1 TSRMLS_CC);
>> +   EG(error_handling)  = error_handling;
>> +   EG(exception_class) = exception_class;
>>/*  We shouldn't fix bad extensions here,
>>because it can break proper ones (Bug #34045)
>>if (!EX(function_state).function->common.return_reference)
>> @@ -912,12 +916,15 @@
>>fci_cache->initialized = 0;
>>}
>>} else { /* ZEND_OVERLOADED_FUNCTION */
>> -
>>ALLOC_INIT_ZVAL(*fci->retval_ptr_ptr);
>>
>> -   /* Not sure what should be done here if it's a 
>> static method */
>> +   /* Not sure what should be done here if it's a static method 
>> */
>>if (fci->object_pp) {
>> +   zend_error_handling_t  error_handling  = 
>> EG(error_handling);
>> +   zend_class_entry  *exception_class = 
>> EG(exception_class);
>>
>> Z_OBJ_HT_PP(fci->object_pp)->call_method(EX(function_state).function->common.function_name,
>>  fci->param_count, *fci->retval_ptr_ptr, fci->retval_ptr_ptr, 
>> *fci->object_pp, 1 TSRMLS_CC);
>> +   EG(error_handling)  = error_handling;
>> +   EG(exception_class) = exception_class;
>>} else {
>>zend_error_noreturn(E_ERROR, "Cannot call overloaded 
>> function for non-object");
>>}
>> http://cvs.php.net/viewvc.cgi/php-src/main/php.h?r1=1.221.2.4.2.8.2.5&r2=1.221.2.4.2.8.2.6&diff_format=u
>> Index: php-src/main/php.h
>> diff -u php-src/main/php.h:1.221.2.4.2.8.2.5 
>> php-src/main/php.h:1.221.2.4.2.8.2.6
>> --- php-src/main/php.h:1.221.2.4.2.8.2.5Tue Jun 24 05:59:53 2008
>> +++ php-src/main/php.h  Fri Aug  8 13:21:52 2008
>> @@ -17,7 +17,7 @@
>>+--+
>>  */
>>
>> -/* $Id: php.h,v 1.221.2.4.2.8.2.5 2008/06/24 05:59:53 kalle Exp $ */
>> +/* $Id: php.h,v 1.221.2.4.2.8.2.6 2008/08/08 13:21:52 helly Exp $ */
>>
>>  #ifndef PHP_H
>>  #define PHP_H
>> @@ -288,7 +288,7 @@
>>
>>  BEGIN_EXTERN_C()
>>  PHPAPI void php_set_error_handling(error_handling_t error_handling, 
>> zend_class_entry *exception_class TSRMLS_DC);
>> -#define php_std_error_handling() php_set_error_handling(EH_NORMAL, NULL 
>> TSRMLS_CC)
>> +static ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {}

> This doesn't look right...

> $ sapi/cli/php -r 'try { new DOMAttr();} catch(Exception $e) {} strpos();'

> Fatal error: Uncaught exception 'DOMException' with message 'strpos()
> expects at least 2 parameters, 0 given' in Command line code:1

I figured out that the VM has a short path through this and needed to
change that as well. We further more realized that the easiy solution won't
work for all cases anyway. So I provided a full version

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

2008-08-08 Thread Pierre-Alain Joye
pajoye  Fri Aug  8 18:46:20 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  - missing entry
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.258&r2=1.2027.2.547.2.965.2.259&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.258 
php-src/NEWS:1.2027.2.547.2.965.2.259
--- php-src/NEWS:1.2027.2.547.2.965.2.258   Fri Aug  8 11:09:31 2008
+++ php-src/NEWSFri Aug  8 18:46:20 2008
@@ -306,6 +306,8 @@
 - Fixed bug #45179 (--with-mysql-sock fails to compile & work). (Andrey)
 - Fixed bug #45038 (Crash when using DateTimeZone object returned by
   Date::getTimezone). (Joe Orton, Derick)
+- Fixed bug #45030 (Destination image alpha channel noise when using 
+  imagecopyresampled). (Pierre)
 - Fixed bug #44769 (declaring private magic methods should throw error).
   (Felipe)
 - Fixed bug #44913 (Segfault when using return in combination with nested loops



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



[PHP-CVS] cvs: php-src /ext/date php_date.c /ext/dom attr.c cdatasection.c comment.c document.c documentfragment.c element.c entityreference.c processinginstruction.c text.c xpath.c /ext/mysqli mysq

2008-08-08 Thread Etienne Kneuss
colder  Fri Aug  8 22:06:43 2008 UTC

  Modified files:  
/php-src/ext/sqlite sqlite.c 
/php-src/ext/splspl_array.c spl_iterators.c spl_observer.c 
spl_directory.c 
/php-src/ext/mysqli mysqli_driver.c 
/php-src/ext/simplexml  simplexml.c 
/php-src/ext/date   php_date.c 
/php-src/ext/domdocumentfragment.c element.c 
processinginstruction.c attr.c document.c 
entityreference.c comment.c xpath.c text.c 
cdatasection.c 
  Log:
  Fix error_handling usage in various extensions
  http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/sqlite.c?r1=1.212&r2=1.213&diff_format=u
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.212 php-src/ext/sqlite/sqlite.c:1.213
--- php-src/ext/sqlite/sqlite.c:1.212   Sat Aug  2 04:40:45 2008
+++ php-src/ext/sqlite/sqlite.c Fri Aug  8 22:06:42 2008
@@ -17,7 +17,7 @@
|  Marcus Boerger <[EMAIL PROTECTED]>  |
+--+
 
-   $Id: sqlite.c,v 1.212 2008/08/02 04:40:45 felipe Exp $
+   $Id: sqlite.c,v 1.213 2008/08/08 22:06:42 colder Exp $
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1612,7 +1612,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, "SQLite support", "enabled");
-   php_info_print_table_row(2, "PECL Module version", 
PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.212 2008/08/02 04:40:45 felipe 
Exp $");
+   php_info_print_table_row(2, "PECL Module version", 
PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.213 2008/08/08 22:06:42 colder 
Exp $");
php_info_print_table_row(2, "SQLite Library", sqlite_libversion());
php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding());
php_info_print_table_end();
@@ -1780,10 +1780,9 @@
zval *errmsg = NULL;
zval *object = getThis();
 
-   php_set_error_handling(object ? EH_THROW : EH_NORMAL, 
sqlite_ce_exception TSRMLS_CC);
+   zend_replace_error_handling(object ? EH_THROW : EH_NORMAL, 
sqlite_ce_exception, NULL TSRMLS_CC);
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
"Z|lz/", &ppfilename, &mode, &errmsg) ||
FAILURE == php_stream_path_param_encode(ppfilename, &filename, 
&filename_len, REPORT_ERRORS, FG(default_context))) {
-   php_std_error_handling();
return;
}
if (errmsg) {
@@ -1794,7 +1793,6 @@
if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
/* resolve the fully-qualified path name to use as the hash key 
*/
if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
-   php_std_error_handling();
if (object) {
RETURN_NULL();
} else {
@@ -1803,7 +1801,6 @@
}
 
if (php_check_open_basedir(fullpath TSRMLS_CC)) {
-   php_std_error_handling();
efree(fullpath);
if (object) {
RETURN_NULL();
@@ -1818,7 +1815,6 @@
if (fullpath) {
efree(fullpath);
}
-   php_std_error_handling();
 }
 /* }}} */
 
@@ -1832,10 +1828,9 @@
int filename_len;
zval *errmsg = NULL;
 
-   php_set_error_handling(EH_THROW, sqlite_ce_exception TSRMLS_CC);
+   zend_replace_error_handling(EH_THROW, sqlite_ce_exception, NULL 
TSRMLS_CC);
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, 
"Z|lz/", &ppfilename, &mode, &errmsg) ||
FAILURE == php_stream_path_param_encode(ppfilename, &filename, 
&filename_len, REPORT_ERRORS, FG(default_context))) {
-   php_std_error_handling();
RETURN_NULL();
}
if (errmsg) {
@@ -1846,13 +1841,11 @@
if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
/* resolve the fully-qualified path name to use as the hash key 
*/
if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
-   php_std_error_handling();
RETURN_NULL();
}
 
if (php_check_open_basedir(fullpath TSRMLS_CC)) {
efree(fullpath);
-   php_std_error_handling();
RETURN_NULL();
}
}
@@ -1861,7 +1854,6 @@
if (fullpath) {
efree(fullpath);
}
-   php_std_error_handling();
 }
 /* }}} */
 
@@ -2629,11 +2621,11 @@
zval *retval_ptr;
zval *ctor_params = NULL;
zend_uchar class_name_type;
+   zend_error_handling error_handling;
 
-   php_set_error_handling(object ? EH_THROW : EH_NORMAL, 
sqlite_ce_exception TSRMLS_CC);
+   zend_replace_error_handling(object ? E

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date php_date.c /ext/dom attr.c cdatasection.c comment.c document.c documentfragment.c element.c entityreference.c processinginstruction.c text.c xpath.c /ext/my

2008-08-08 Thread Etienne Kneuss
colder  Fri Aug  8 22:07:08 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sqlite sqlite.c 
/php-src/ext/splspl_array.c spl_iterators.c spl_observer.c 
spl_directory.c 
/php-src/ext/mysqli mysqli_driver.c 
/php-src/ext/simplexml  simplexml.c 
/php-src/ext/date   php_date.c 
/php-src/ext/domdocumentfragment.c element.c 
processinginstruction.c attr.c document.c 
entityreference.c comment.c xpath.c text.c 
cdatasection.c 
  Log:
  MFH: Fix error_handling usage in various extensions
  http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/sqlite.c?r1=1.166.2.13.2.9.2.10&r2=1.166.2.13.2.9.2.11&diff_format=u
Index: php-src/ext/sqlite/sqlite.c
diff -u php-src/ext/sqlite/sqlite.c:1.166.2.13.2.9.2.10 
php-src/ext/sqlite/sqlite.c:1.166.2.13.2.9.2.11
--- php-src/ext/sqlite/sqlite.c:1.166.2.13.2.9.2.10 Sat Aug  2 04:46:06 2008
+++ php-src/ext/sqlite/sqlite.c Fri Aug  8 22:07:06 2008
@@ -17,7 +17,7 @@
|  Marcus Boerger <[EMAIL PROTECTED]>  |
+--+
 
-   $Id: sqlite.c,v 1.166.2.13.2.9.2.10 2008/08/02 04:46:06 felipe Exp $
+   $Id: sqlite.c,v 1.166.2.13.2.9.2.11 2008/08/08 22:07:06 colder Exp $
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1520,7 +1520,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, "SQLite support", "enabled");
-   php_info_print_table_row(2, "PECL Module version", 
PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.166.2.13.2.9.2.10 2008/08/02 
04:46:06 felipe Exp $");
+   php_info_print_table_row(2, "PECL Module version", 
PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c,v 1.166.2.13.2.9.2.11 2008/08/08 
22:07:06 colder Exp $");
php_info_print_table_row(2, "SQLite Library", sqlite_libversion());
php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding());
php_info_print_table_end();
@@ -1687,10 +1687,9 @@
zval *errmsg = NULL;
zval *object = getThis();
 
-   php_set_error_handling(object ? EH_THROW : EH_NORMAL, 
sqlite_ce_exception TSRMLS_CC);
+   zend_replace_error_handling(object ? EH_THROW : EH_NORMAL, 
sqlite_ce_exception, NULL TSRMLS_CC);
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/",
&filename, &filename_len, &mode, &errmsg)) {
-   php_std_error_handling();
return;
}
if (errmsg) {
@@ -1701,7 +1700,6 @@
if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
/* resolve the fully-qualified path name to use as the hash key 
*/
if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
-   php_std_error_handling();
if (object) {
RETURN_NULL();
} else {
@@ -1711,7 +1709,6 @@
 
if ((PG(safe_mode) && (!php_checkuid(fullpath, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) ||
php_check_open_basedir(fullpath TSRMLS_CC)) {
-   php_std_error_handling();
efree(fullpath);
if (object) {
RETURN_NULL();
@@ -1726,7 +1723,6 @@
if (fullpath) {
efree(fullpath);
}
-   php_std_error_handling();
 }
 /* }}} */
 
@@ -1739,10 +1735,9 @@
int filename_len;
zval *errmsg = NULL;
 
-   php_set_error_handling(EH_THROW, sqlite_ce_exception TSRMLS_CC);
+   zend_replace_error_handling(EH_THROW, sqlite_ce_exception, NULL 
TSRMLS_CC);
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lz/",
&filename, &filename_len, &mode, &errmsg)) {
-   php_std_error_handling();
RETURN_NULL();
}
if (errmsg) {
@@ -1753,14 +1748,12 @@
if (strncmp(filename, ":memory:", sizeof(":memory:") - 1)) {
/* resolve the fully-qualified path name to use as the hash key 
*/
if (!(fullpath = expand_filepath(filename, NULL TSRMLS_CC))) {
-   php_std_error_handling();
RETURN_NULL();
}
 
if ((PG(safe_mode) && (!php_checkuid(fullpath, NULL, 
CHECKUID_CHECK_FILE_AND_DIR))) ||
php_check_open_basedir(fullpath TSRMLS_CC)) {
efree(fullpath);
-   php_std_error_handling();
RETURN_NULL();
}
}
@@ -1769,7 +1762,6 @@
if (fullpath) {
efree(fullpath);
}
-   php_std_error_handling();
 }
 /* }}} */
 
@@ -2425,11 +2417,11 @@
zend_fcall_info_cache fcc;
zval *retval_ptr;
zval *ctor_params = NULL;
+  

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/reflection php_reflection.c

2008-08-08 Thread Felix De Vliegher
felixdv Fri Aug  8 10:52:49 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/reflection php_reflection.c 
  Log:
  Documentation fix for getClosure()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.45.2.26&r2=1.164.2.33.2.45.2.27&diff_format=u
Index: php-src/ext/reflection/php_reflection.c
diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.26 
php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.27
--- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.26Sat Jul 
26 13:14:03 2008
+++ php-src/ext/reflection/php_reflection.c Fri Aug  8 10:52:48 2008
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.26 2008/07/26 13:14:03 dmitry Exp 
$ */
+/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.27 2008/08/08 10:52:48 felixdv 
Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1565,7 +1565,7 @@
 /* }}} */
 
 /* {{{ proto public mixed ReflectionFunction::getClosure()
-   Invokes the function */
+   Returns a dynamically created closure for the function */
 ZEND_METHOD(reflection_function, getClosure)
 {
reflection_object *intern;
@@ -5117,7 +5117,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.45.2.26 2008/07/26 13:14:03 dmitry Exp $");
+   php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 
1.164.2.33.2.45.2.27 2008/08/08 10:52:48 felixdv Exp $");
 
php_info_print_table_end();
 } /* }}} */



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