[PHP-CVS] cvs: php-src(PHP_5_3) /win32/build projectgen.js

2008-07-17 Thread Steph Fox
sfoxFri Jul 18 02:53:06 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/win32/buildprojectgen.js 
  Log:
  - SAPIs are go.
  Caveat: aolserver, isapi, nsapi, pi3web and (obviously) Linux-specific 
modules not tested.
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/projectgen.js?r1=1.1.2.4&r2=1.1.2.5&diff_format=u
Index: php-src/win32/build/projectgen.js
diff -u php-src/win32/build/projectgen.js:1.1.2.4 
php-src/win32/build/projectgen.js:1.1.2.5
--- php-src/win32/build/projectgen.js:1.1.2.4   Wed Jul 16 22:25:46 2008
+++ php-src/win32/build/projectgen.js   Fri Jul 18 02:53:06 2008
@@ -290,15 +290,22 @@
ext = address.slice(address.lastIndexOf("\\")+1, 
address.length-4);
EXT = ext.toUpperCase();
 
+   if (path.match(/(sapi|ext)/)) {
+   rel = "..\\..\\";
+   } else {
+   rel = "..\\";
+   }
+
/* pick up local flags and libs */
cflags = (get_define("CFLAGS_" + EXT) ? get_define("CFLAGS_" + 
EXT) : "");
cflags += (ext.match(/(TSRM|Zend)/) ? "/D TSRM_EXPORTS " : "");
cflags += (ext.match(/Zend/) ? "/D LIBZEND_EXPORTS " : "");
libs = get_define("LIBS_" + EXT);
ldflags = get_define("LDFLAGS_" + EXT);
-   contents = contents.replace(/LOCALCPP/, cflags + "/c");
+   ldflags = (ldflags ? ldflags.replace(/(\.\.\\)/g, rel + "$1") : 
"");
+   contents = contents.replace(/LOCALCPP/, cflags + " /c");
contents = contents.replace(/LOCALLIBS\s/, (libs ? libs + " " : 
""));
-   contents = contents.replace(/LOCALLDFLAGS\s/, (ldflags ? 
ldflags + " " : ""));
+   contents = contents.replace(/LOCALLDFLAGS\s/, ldflags);
 
if (ext.match("Zend")) {
arr = new Array("ini", "language");
@@ -331,18 +338,14 @@
contents = contents.replace(/\"cgi/g, '"' + 
newext);
contents = contents.replace(/cgi\.exe/g, 
"php-cgi.exe");
 
-   } else if (ext == "embed") {
-
-   /* leave embed alone for now */
-   continue;
-
} else {
 
-   /* change of address: server modules get a 
prefix */
-   /* DOESN'T WORK YET */
-   continue;
-   newext = "php5" + ext;
+   /* there's always one... most sapis just get a 
'php5' prefix */
+   newext = (ext.match(/apache2handler/) ? 
"php5apache2" : "php5" + ext);
address = address.replace(ext + ".dsp", newext 
+ ".dsp");
+   srcpath = ".\\";
+   oldext = new RegExp(ext, "g");
+   contents = contents.replace(oldext, newext);
}
 
contents = contents.replace("CFG=" + ext, "CFG=" + 
newext);



-- 
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/gd gd.c php_gd.h

2008-07-17 Thread Scott MacVicar
scottmacFri Jul 18 01:51:49 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/gd gd.c php_gd.h 
  Log:
  Remove GD 1.0 support, still need to adjust the configure scripts to 
correctly check for a newer version
  
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.32.2.12&r2=1.312.2.20.2.32.2.13&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.32.2.12 
php-src/ext/gd/gd.c:1.312.2.20.2.32.2.13
--- php-src/ext/gd/gd.c:1.312.2.20.2.32.2.12Fri Jul 18 01:16:25 2008
+++ php-src/ext/gd/gd.c Fri Jul 18 01:51:48 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.32.2.12 2008/07/18 01:16:25 scottmac Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.32.2.13 2008/07/18 01:51:48 scottmac Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -181,7 +181,6 @@
ZEND_ARG_INFO(0, styles) /* ARRAY_INFO(0, styles, 0) */
 ZEND_END_ARG_INFO()
 
-#if HAVE_LIBGD20
 static
 ZEND_BEGIN_ARG_INFO(arginfo_imagecreatetruecolor, 0)
ZEND_ARG_INFO(0, x_size)
@@ -199,7 +198,6 @@
ZEND_ARG_INFO(0, ditherFlag)
ZEND_ARG_INFO(0, colorsWanted)
 ZEND_END_ARG_INFO()
-#endif
 
 #if HAVE_GD_BUNDLED
 static
@@ -209,7 +207,6 @@
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_LIBGD20
 static
 ZEND_BEGIN_ARG_INFO(arginfo_imagesetthickness, 0)
ZEND_ARG_INFO(0, im)
@@ -250,7 +247,6 @@
ZEND_ARG_INFO(0, im)
ZEND_ARG_INFO(0, save)
 ZEND_END_ARG_INFO()
-#endif
 
 #if HAVE_GD_BUNDLED
 static
@@ -260,7 +256,6 @@
 ZEND_END_ARG_INFO()
 #endif
 
-#if HAVE_LIBGD20
 static
 ZEND_BEGIN_ARG_INFO(arginfo_imagecolorallocatealpha, 0)
ZEND_ARG_INFO(0, im)
@@ -310,7 +305,6 @@
ZEND_ARG_INFO(0, src_w)
ZEND_ARG_INFO(0, src_h)
 ZEND_END_ARG_INFO()
-#endif
 
 #ifdef PHP_WIN32
 static
@@ -814,7 +808,7 @@
 ZEND_END_ARG_INFO()
 
 #ifdef ENABLE_GD_TTF
-#if HAVE_LIBGD20 && HAVE_LIBFREETYPE && HAVE_GD_STRINGFTEX
+#if HAVE_LIBFREETYPE && HAVE_GD_STRINGFTEX
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_imageftbbox, 0, 0, 4)
ZEND_ARG_INFO(0, size)
@@ -1014,7 +1008,6 @@
 #endif
PHP_FE(imagecopyresized,
arginfo_imagecopyresized)
PHP_FE(imagecreate, 
arginfo_imagecreate)
-#if HAVE_LIBGD20
PHP_FE(imagecreatetruecolor,
arginfo_imagecreatetruecolor)
PHP_FE(imageistruecolor,
arginfo_imageistruecolor)
PHP_FE(imagetruecolortopalette, 
arginfo_imagetruecolortopalette)
@@ -1028,7 +1021,6 @@
PHP_FE(imagecolorclosestalpha,  
arginfo_imagecolorclosestalpha)
PHP_FE(imagecolorexactalpha,
arginfo_imagecolorexactalpha)
PHP_FE(imagecopyresampled,  
arginfo_imagecopyresampled)
-#endif
 
 #ifdef PHP_WIN32
PHP_FE(imagegrabwindow, 
arginfo_imagegrabwindow)
@@ -1113,7 +1105,7 @@
 #ifdef ENABLE_GD_TTF
PHP_FE(imagettfbbox,
arginfo_imagettfbbox)
PHP_FE(imagettftext,
arginfo_imagettftext)
-#if HAVE_LIBGD20 && HAVE_LIBFREETYPE && HAVE_GD_STRINGFTEX
+#if HAVE_LIBFREETYPE && HAVE_GD_STRINGFTEX
PHP_FE(imageftbbox, 
arginfo_imageftbbox)
PHP_FE(imagefttext, 
arginfo_imagefttext)
 #endif
@@ -1168,7 +1160,7 @@
NULL,
 #endif
NULL,
-#if HAVE_LIBGD20 && HAVE_GD_STRINGFT && (HAVE_LIBFREETYPE && 
(HAVE_GD_FONTCACHESHUTDOWN || HAVE_GD_FREEFONTCACHE))
+#if HAVE_GD_STRINGFT && (HAVE_LIBFREETYPE && (HAVE_GD_FONTCACHESHUTDOWN || 
HAVE_GD_FREEFONTCACHE))
PHP_RSHUTDOWN(gd),
 #else
NULL,
@@ -1262,14 +1254,12 @@
REGISTER_LONG_CONSTANT("IMG_COLOR_STYLEDBRUSHED", gdStyledBrushed, 
CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_COLOR_TRANSPARENT", gdTransparent, CONST_CS 
| CONST_PERSISTENT);
 #endif
-#if HAVE_LIBGD20
/* for imagefilledarc */
REGISTER_LONG_CONSTANT("IMG_ARC_ROUNDED", gdArc, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_ARC_PIE", gdPie, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_ARC_CHORD", gdChord, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_ARC_NOFILL", gdNoFill, CONST_CS | 
CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IMG_ARC_EDGED", gdEdged, CONST_CS | 
CONST_PERSISTENT);
-#endif
 /* GD2 image format types */
 #ifdef GD2_FMT_RAW
REGISTER_LONG_CONSTANT("IMG_GD2_RAW

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/gd config.m4 config.w32 gd.c gdcache.c gdttf.c gdttf.h php_gd.h /ext/gd/libgd gdcache.c

2008-07-17 Thread Scott MacVicar
scottmacFri Jul 18 01:16:25 2008 UTC

  Removed files:   (Branch: PHP_5_3)
/php-src/ext/gd gdttf.c gdttf.h 

  Modified files:  
/php-src/ext/gd config.m4 config.w32 gd.c gdcache.c php_gd.h 
/php-src/ext/gd/libgd   gdcache.c 
  Log:
  Remove freetype1 support
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.m4?r1=1.154.2.1.2.6&r2=1.154.2.1.2.6.2.1&diff_format=u
Index: php-src/ext/gd/config.m4
diff -u php-src/ext/gd/config.m4:1.154.2.1.2.6 
php-src/ext/gd/config.m4:1.154.2.1.2.6.2.1
--- php-src/ext/gd/config.m4:1.154.2.1.2.6  Tue Jul  3 17:25:33 2007
+++ php-src/ext/gd/config.m4Fri Jul 18 01:16:25 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.154.2.1.2.6 2007/07/03 17:25:33 sniper Exp $
+dnl $Id: config.m4,v 1.154.2.1.2.6.2.1 2008/07/18 01:16:25 scottmac Exp $
 dnl
 
 dnl
@@ -28,9 +28,6 @@
 PHP_ARG_WITH(xpm-dir, for the location of libXpm,
 [  --with-xpm-dir[=DIR]  GD: Set the path to libXpm install prefix], no, 
no)
 
-PHP_ARG_WITH(ttf, for FreeType 1.x support,
-[  --with-ttf[=DIR]  GD: Include FreeType 1.x support], no, no)
-
 PHP_ARG_WITH(freetype-dir, for FreeType 2,
 [  --with-freetype-dir[=DIR] GD: Set the path to FreeType 2 install prefix], 
no, no)
 
@@ -165,41 +162,6 @@
   fi
 ])
 
-AC_DEFUN([PHP_GD_FREETYPE1],[
-  if test "$PHP_TTF" != "no"; then
-if test "$PHP_FREETYPE_DIR" = "no" || test "$PHP_FREETYPE_DIR" = ""; then
-  if test -n "$PHP_TTF"; then
-for i in $PHP_TTF /usr/local /usr; do
-  if test -f "$i/include/freetype.h"; then
-TTF_DIR=$i
-unset TTF_INC_DIR
-  fi
-  if test -f "$i/include/freetype/freetype.h"; then
-TTF_DIR=$i
-TTF_INC_DIR=$i/include/freetype
-  fi
-  if test -f "$i/include/freetype1/freetype/freetype.h"; then
-TTF_DIR=$i
-TTF_INC_DIR=$i/include/freetype1/freetype
-  fi
-  test -n "$TTF_DIR" && break
-done
-  fi
-  if test -n "$TTF_DIR" ; then
-AC_DEFINE(HAVE_LIBTTF,1,[ ])
-PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD)
-  fi
-  if test -z "$TTF_INC_DIR"; then
-TTF_INC_DIR=$TTF_DIR/include
-  fi
-  PHP_ADD_INCLUDE($TTF_INC_DIR)
-else
-  AC_MSG_CHECKING(for FreeType 1 support)
-  AC_MSG_RESULT([no - FreeType 2.x is to be used instead])
-fi
-  fi
-])
-
 AC_DEFUN([PHP_GD_FREETYPE2],[
   if test "$PHP_FREETYPE_DIR" != "no"; then
 
@@ -322,7 +284,6 @@
   PHP_GD_PNG
   PHP_GD_XPM
   PHP_GD_FREETYPE2
-  PHP_GD_FREETYPE1
   PHP_GD_T1LIB
 
 dnl These are always available with bundled library
@@ -370,10 +331,6 @@
 GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_LIBFREETYPE"
   fi
 
-  if test -n "$TTF_DIR"; then
-GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_LIBTTF"
-  fi
-
   if test -n "$USE_GD_JIS_CONV"; then
 AC_DEFINE(USE_GD_JISX0208, 1, [ ])
 GDLIB_CFLAGS="$GDLIB_CFLAGS -DJISX0208"
@@ -392,7 +349,6 @@
   PHP_GD_PNG
   PHP_GD_XPM
   PHP_GD_FREETYPE2
-  PHP_GD_FREETYPE1
   PHP_GD_T1LIB
 
 dnl Header path
@@ -441,7 +397,7 @@
 dnl Common for both builtin and external GD
 dnl
 if test "$PHP_GD" != "no"; then
-  PHP_NEW_EXTENSION(gd, gd.c gdttf.c $extra_sources, $ext_shared,, 
\\$(GDLIB_CFLAGS))
+  PHP_NEW_EXTENSION(gd, gd.c $extra_sources, $ext_shared,, \\$(GDLIB_CFLAGS))
 
   if test "$GD_MODULE_TYPE" = "builtin"; then
 GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS"
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/config.w32?r1=1.10.4.4.2.6&r2=1.10.4.4.2.7&diff_format=u
Index: php-src/ext/gd/config.w32
diff -u php-src/ext/gd/config.w32:1.10.4.4.2.6 
php-src/ext/gd/config.w32:1.10.4.4.2.7
--- php-src/ext/gd/config.w32:1.10.4.4.2.6  Fri Jul 11 15:05:05 2008
+++ php-src/ext/gd/config.w32   Fri Jul 18 01:16:25 2008
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.10.4.4.2.6 2008/07/11 15:05:05 rrichards Exp $
+// $Id: config.w32,v 1.10.4.4.2.7 2008/07/18 01:16:25 scottmac Exp $
 // vim:ft=javascript
 
 ARG_WITH("gd", "Bundled GD support", "yes,shared");
@@ -28,7 +28,7 @@
CHECK_LIB("User32.lib", "gd", PHP_GD);
CHECK_LIB("Gdi32.lib", "gd", PHP_GD);
 
-   EXTENSION("gd", "gd.c gdttf.c", null, "-Iext/gd/libgd", 
"php_gd2.dll");
+   EXTENSION("gd", "gd.c", null, "-Iext/gd/libgd", "php_gd2.dll");
ADD_SOURCES("ext/gd/libgd", "gd2copypal.c gd_arc_f_buggy.c gd.c 
\
gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c 
gdfontt.c \
gdft.c gd_gd2.c gd_gd.c gd_gif_in.c gd_gif_out.c 
gdhelpers.c gd_io.c gd_io_dp.c \
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.32.2.11&r2=1.312.2.20.2.32.2.12&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.32.2.11 
php-src/ext/gd/gd.c:1.312.2.20.2.32.2.12
--- php-src/ext/gd/gd.c:1.312.2.20.2.32.2.11Thu Jul 17 23:13:09 2008
+++ php-src/ext/gd/gd.c Fri Jul 18 01:16:25 2008
@@ -

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard basic_functions.c /ext/standard/tests/general_functions bug41037.phpt closures_002.phpt ZendEngine2 zend_compile.c ZendEngine2/tests bug43027.phpt j

2008-07-17 Thread Felipe Pena
Em Sex, 2008-07-18 às 01:15 +0300, Jani Taskinen escreveu:
> Isn't "ticks" plural? ;) "ticks is" -> "ticks are"
> 

The word 'ticks' was used to mention the directive name. 
Anyway, is it still wrong?


-- 
Regards,
Felipe Pena.


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



[PHP-CVS] cvs: php-src /ext/gd gd.c /ext/gd/tests imageloadfont_invalid.phpt

2008-07-17 Thread Pierre-Alain Joye
pajoye  Thu Jul 17 23:28:11 2008 UTC

  Modified files:  
/php-src/ext/gd gd.c 
/php-src/ext/gd/tests   imageloadfont_invalid.phpt 
  Log:
  - MFB: fix crash when some crafted font are given
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.389&r2=1.390&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.389 php-src/ext/gd/gd.c:1.390
--- php-src/ext/gd/gd.c:1.389   Mon Jul  7 08:40:04 2008
+++ php-src/ext/gd/gd.c Thu Jul 17 23:28:11 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.389 2008/07/07 08:40:04 pajoye Exp $ */
+/* $Id: gd.c,v 1.390 2008/07/17 23:28:11 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1483,6 +1483,19 @@
body_size = font->w * font->h * font->nchars;
}
 
+   if (overflow2(font->nchars, font->h)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading 
font, invalid font header");
+   efree(font);
+   php_stream_close(stream);
+   RETURN_FALSE;
+   }
+   if (overflow2(font->nchars * font->h, font->w )) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading 
font, invalid font header");
+   efree(font);
+   php_stream_close(stream);
+   RETURN_FALSE;
+   }
+
if (body_size != body_size_check) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading 
font");
efree(font);
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/tests/imageloadfont_invalid.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/gd/tests/imageloadfont_invalid.phpt
diff -u /dev/null php-src/ext/gd/tests/imageloadfont_invalid.phpt:1.2
--- /dev/null   Thu Jul 17 23:28:11 2008
+++ php-src/ext/gd/tests/imageloadfont_invalid.phpt Thu Jul 17 23:28:11 2008
@@ -0,0 +1,25 @@
+--TEST--
+imageloadfont() function crashes
+--SKIPIF--
+
+--FILE--
+
+--EXPECTF--
+Warning: imageloadfont(): gd warning: product of memory allocation 
multiplication would exceed INT_MAX, failing operation gracefully
+ in %simageloadfont_invalid.php on line %d
+
+Warning: imageloadfont(): Error reading font, invalid font header in 
%simageloadfont_invalid.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/gd gd.c /ext/gd/tests imageloadfont_invalid.phpt

2008-07-17 Thread Pierre-Alain Joye
pajoye  Thu Jul 17 23:13:09 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/gd/tests   imageloadfont_invalid.phpt 

  Modified files:  
/php-src/ext/gd gd.c 
  Log:
   - MFB: fix crash when some crafted font are given
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.32.2.10&r2=1.312.2.20.2.32.2.11&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.32.2.10 
php-src/ext/gd/gd.c:1.312.2.20.2.32.2.11
--- php-src/ext/gd/gd.c:1.312.2.20.2.32.2.10Tue Jul  8 15:24:12 2008
+++ php-src/ext/gd/gd.c Thu Jul 17 23:13:09 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.32.2.10 2008/07/08 15:24:12 tony2001 Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.32.2.11 2008/07/17 23:13:09 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1634,6 +1634,19 @@
body_size = font->w * font->h * font->nchars;
}
 
+   if (overflow2(font->nchars, font->h)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading 
font, invalid font header");
+   efree(font);
+   php_stream_close(stream);
+   RETURN_FALSE;
+   }
+   if (overflow2(font->nchars * font->h, font->w )) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading 
font, invalid font header");
+   efree(font);
+   php_stream_close(stream);
+   RETURN_FALSE;
+   }
+
if (body_size != body_size_check) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading 
font");
efree(font);

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



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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/gd gd.c /ext/gd/tests imageloadfont_invalid.phpt

2008-07-17 Thread Pierre-Alain Joye
pajoye  Thu Jul 17 22:58:24 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/gd/tests   imageloadfont_invalid.phpt 

  Modified files:  
/php-src/ext/gd gd.c 
  Log:
  - MFB: fix crash when some crafted font are given
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.35&r2=1.312.2.20.2.36&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.35 php-src/ext/gd/gd.c:1.312.2.20.2.36
--- php-src/ext/gd/gd.c:1.312.2.20.2.35 Sun May  4 21:19:17 2008
+++ php-src/ext/gd/gd.c Thu Jul 17 22:58:23 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.312.2.20.2.35 2008/05/04 21:19:17 colder Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.36 2008/07/17 22:58:23 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -1636,6 +1636,22 @@
font->nchars = FLIPWORD(font->nchars);
body_size = font->w * font->h * font->nchars;
}
+
+   if (overflow2(font->nchars, font->h)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading 
font, invalid font header");
+   efree(font);
+   php_stream_close(stream);
+   RETURN_FALSE;
+   }
+   if (overflow2(font->nchars * font->h, font->w )) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading 
font, invalid font header");
+   efree(font);
+   php_stream_close(stream);
+   RETURN_FALSE;
+   }
+
+
+
 
if (body_size != body_size_check) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading 
font");

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



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



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

2008-07-17 Thread Pierre-Alain Joye
pajoye  Thu Jul 17 22:42:07 2008 UTC

  Modified files:  (Branch: PHP_4_4)
/php-srcNEWS 
  Log:
  - a dot :)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.1247.2.920.2.249&r2=1.1247.2.920.2.250&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.249 php-src/NEWS:1.1247.2.920.2.250
--- php-src/NEWS:1.1247.2.920.2.249 Thu Jul 17 18:08:04 2008
+++ php-src/NEWSThu Jul 17 22:42:06 2008
@@ -2,7 +2,7 @@
 |||
 ?? ?? 2008, Version 4.4.9
 - Updated PCRE to version 7.7. (Nuno)
-- Fixed crash in imageloadfont when an invalid font is given
+- Fixed crash in imageloadfont when an invalid font is given.
   (discovered by CzechSec, fixed by Pierre)
 
 03 Jan 2008, Version 4.4.8



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

2008-07-17 Thread Johannes Schlüter
On Tue, 2008-07-15 at 17:29 +0200, "Hannes Magnusson" wrote:
> > to the new API, so we can only guess. And return null is the better
> > guess from MPOV.
> 
> Some of those functions have been using that API for years...
> Why would you need to guess anything anyway?

Reading the old ode should be enough, in this case they used both - at
least some of the returned null if the argcount was wrong and false if
zend_get_parameter failed for some random reason. And then I'd say NULL
is better.

johannes


-- 
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/standard basic_functions.c /ext/standard/tests/general_functions bug41037.phpt closures_002.phpt ZendEngine2 zend_compile.c ZendEngine2/tests bug43027.phpt

2008-07-17 Thread Jani Taskinen

Isn't "ticks" plural? ;) "ticks is" -> "ticks are"

--Jani

Felipe Pena kirjoitti:

felipe  Thu Jul 17 19:29:34 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/ZendEngine2	zend_compile.c 
/ZendEngine2/tests	bug43027.phpt jump12.phpt 
/php-src/ext/standard	basic_functions.c 
/php-src/ext/standard/tests/general_functions	bug41037.phpt 
 	closures_002.phpt 
  Log:

  - Deprecate ticks
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.72&r2=1.647.2.27.2.41.2.73&diff_format=u

Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.72 
ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.73
--- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.72 Mon Jul 14 12:18:20 2008
+++ ZendEngine2/zend_compile.c  Thu Jul 17 19:29:34 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.72 2008/07/14 12:18:20 dmitry Exp $ */

+/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.73 2008/07/17 19:29:34 felipe Exp $ 
*/
 
 #include 

 #include "zend.h"
@@ -4592,6 +4592,8 @@
if (!zend_binary_strcasecmp(var->u.constant.value.str.val, var->u.constant.value.str.len, 
"ticks", sizeof("ticks")-1)) {
convert_to_long(&val->u.constant);
CG(declarables).ticks = val->u.constant;
+   
+   zend_error(E_DEPRECATED, "Ticks is deprecated and will be removed in 
PHP 6");
 #ifdef ZEND_MULTIBYTE
} else if (!zend_binary_strcasecmp(var->u.constant.value.str.val, 
var->u.constant.value.str.len, "encoding", sizeof("encoding")-1)) {
zend_encoding *new_encoding, *old_encoding;
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug43027.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: ZendEngine2/tests/bug43027.phpt
diff -u ZendEngine2/tests/bug43027.phpt:1.1.2.1 
ZendEngine2/tests/bug43027.phpt:1.1.2.2
--- ZendEngine2/tests/bug43027.phpt:1.1.2.1 Thu Nov  1 11:58:58 2007
+++ ZendEngine2/tests/bug43027.phpt Thu Jul 17 19:29:34 2008
@@ -6,5 +6,6 @@
 namespace test;
 echo "ok\n";
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
 ok
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/jump12.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: ZendEngine2/tests/jump12.phpt
diff -u ZendEngine2/tests/jump12.phpt:1.1.2.2 
ZendEngine2/tests/jump12.phpt:1.1.2.3
--- ZendEngine2/tests/jump12.phpt:1.1.2.2   Fri Mar 28 14:35:01 2008
+++ ZendEngine2/tests/jump12.phpt   Thu Jul 17 19:29:34 2008
@@ -13,7 +13,8 @@
 print "ok!\n";
 goto b;
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
 ok!
 ok!
 ok!
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.36&r2=1.725.2.31.2.64.2.37&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.36 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.37
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.36 Thu Jul 17 
09:53:42 2008
+++ php-src/ext/standard/basic_functions.c  Thu Jul 17 19:29:34 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.36 2008/07/17 09:53:42 dmitry Exp $ */

+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.37 2008/07/17 19:29:34 felipe 
Exp $ */
 
 #include "php.h"

 #include "php_streams.h"
@@ -6031,6 +6031,8 @@
if (tick_fe.arg_count < 1) {
WRONG_PARAM_COUNT;
}
+   
+   php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "Ticks is deprecated and will 
be removed in PHP 6");
 
 	tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), tick_fe.arg_count, 0);
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug41037.phpt?r1=1.1.2.2&r2=1.1.2.2.2.1&diff_format=u

Index: php-src/ext/standard/tests/general_functions/bug41037.phpt
diff -u php-src/ext/standard/tests/general_functions/bug41037.phpt:1.1.2.2 
php-src/ext/standard/tests/general_functions/bug41037.phpt:1.1.2.2.2.1
--- php-src/ext/standard/tests/general_functions/bug41037.phpt:1.1.2.2  Tue Apr 
10 09:37:09 2007
+++ php-src/ext/standard/tests/general_functions/bug41037.phpt  Thu Jul 17 
19:29:34 2008
@@ -14,6 +14,9 @@
 echo "Done\n";
 ?>
 --EXPECTF--
+Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
+
+Deprecated: register_tick_function(): Ticks is deprecated and will be removed 
in PHP 6 in %s on line %d
 hello
 Warning: unregister_tick_function(): Unable to delete tick function executed 
at the moment in %s on line %d
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/closures_002.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/general_func

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

2008-07-17 Thread Moriyoshi Koizumi
moriyoshi   Thu Jul 17 20:04:06 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mbstring   mbstring.c php_mbregex.h 
  Log:
  - MFH: Fix ZTS build
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.25.2.18&r2=1.224.2.22.2.25.2.19&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.18 
php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.19
--- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.18Thu Jul 17 
16:08:37 2008
+++ php-src/ext/mbstring/mbstring.c Thu Jul 17 20:04:05 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.224.2.22.2.25.2.18 2008/07/17 16:08:37 moriyoshi Exp $ 
*/
+/* $Id: mbstring.c,v 1.224.2.22.2.25.2.19 2008/07/17 20:04:05 moriyoshi Exp $ 
*/
 
 /*
  * PHP 4 Multibyte String module "mbstring"
@@ -1008,12 +1008,12 @@
 #if HAVE_MBREGEX
{
const char *enc_name = new_value;
-   if (FAILURE == 
php_mb_regex_set_default_mbctype(enc_name)) {
+   if (FAILURE == 
php_mb_regex_set_default_mbctype(enc_name TSRMLS_CC)) {
/* falls back to EUC-JP if an unknown encoding 
name is given */
enc_name = "EUC-JP";
-   php_mb_regex_set_default_mbctype(enc_name);
+   php_mb_regex_set_default_mbctype(enc_name 
TSRMLS_CC);
}
-   php_mb_regex_set_mbctype(new_value);
+   php_mb_regex_set_mbctype(new_value TSRMLS_CC);
}
 #endif
 #ifdef ZEND_MULTIBYTE
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/php_mbregex.h?r1=1.12.2.1.2.1.2.7&r2=1.12.2.1.2.1.2.8&diff_format=u
Index: php-src/ext/mbstring/php_mbregex.h
diff -u php-src/ext/mbstring/php_mbregex.h:1.12.2.1.2.1.2.7 
php-src/ext/mbstring/php_mbregex.h:1.12.2.1.2.1.2.8
--- php-src/ext/mbstring/php_mbregex.h:1.12.2.1.2.1.2.7 Thu Jul 17 16:08:37 2008
+++ php-src/ext/mbstring/php_mbregex.h  Thu Jul 17 20:04:06 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_mbregex.h,v 1.12.2.1.2.1.2.7 2008/07/17 16:08:37 moriyoshi Exp $ */
+/* $Id: php_mbregex.h,v 1.12.2.1.2.1.2.8 2008/07/17 20:04:06 moriyoshi Exp $ */
  
 #ifndef _PHP_MBREGEX_H
 #define _PHP_MBREGEX_H
@@ -69,7 +69,7 @@
 
 typedef struct _zend_mb_regex_globals zend_mb_regex_globals;
 
-zend_mb_regex_globals *php_mb_regex_globals_new(TSRMLS_D);
+zend_mb_regex_globals *php_mb_regex_globals_alloc(TSRMLS_D);
 void php_mb_regex_globals_free(zend_mb_regex_globals *pglobals TSRMLS_DC);
 int php_mb_regex_set_mbctype(const char *enc TSRMLS_DC);
 int php_mb_regex_set_default_mbctype(const char *encname TSRMLS_DC);



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



[PHP-CVS] cvs: php-src /ext/mbstring mbstring.c php_mbregex.h

2008-07-17 Thread Moriyoshi Koizumi
moriyoshi   Thu Jul 17 20:03:50 2008 UTC

  Modified files:  
/php-src/ext/mbstring   mbstring.c php_mbregex.h 
  Log:
  - Fix ZTS build
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.285&r2=1.286&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.285 
php-src/ext/mbstring/mbstring.c:1.286
--- php-src/ext/mbstring/mbstring.c:1.285   Thu Jul 17 16:08:08 2008
+++ php-src/ext/mbstring/mbstring.c Thu Jul 17 20:03:50 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.285 2008/07/17 16:08:08 moriyoshi Exp $ */
+/* $Id: mbstring.c,v 1.286 2008/07/17 20:03:50 moriyoshi Exp $ */
 
 /*
  * PHP 4 Multibyte String module "mbstring"
@@ -1013,12 +1013,12 @@
 #if HAVE_MBREGEX
{
const char *enc_name = new_value;
-   if (FAILURE == 
php_mb_regex_set_default_mbctype(enc_name)) {
+   if (FAILURE == 
php_mb_regex_set_default_mbctype(enc_name TSRMLS_CC)) {
/* falls back to EUC-JP if an unknown encoding 
name is given */
enc_name = "EUC-JP";
-   php_mb_regex_set_default_mbctype(enc_name);
+   php_mb_regex_set_default_mbctype(enc_name 
TSRMLS_CC);
}
-   php_mb_regex_set_mbctype(new_value);
+   php_mb_regex_set_mbctype(new_value TSRMLS_CC);
}
 #endif
 #ifdef ZEND_MULTIBYTE
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/php_mbregex.h?r1=1.18&r2=1.19&diff_format=u
Index: php-src/ext/mbstring/php_mbregex.h
diff -u php-src/ext/mbstring/php_mbregex.h:1.18 
php-src/ext/mbstring/php_mbregex.h:1.19
--- php-src/ext/mbstring/php_mbregex.h:1.18 Thu Jul 17 16:08:08 2008
+++ php-src/ext/mbstring/php_mbregex.h  Thu Jul 17 20:03:50 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_mbregex.h,v 1.18 2008/07/17 16:08:08 moriyoshi Exp $ */
+/* $Id: php_mbregex.h,v 1.19 2008/07/17 20:03:50 moriyoshi Exp $ */
  
 #ifndef _PHP_MBREGEX_H
 #define _PHP_MBREGEX_H
@@ -69,7 +69,7 @@
 
 typedef struct _zend_mb_regex_globals zend_mb_regex_globals;
 
-zend_mb_regex_globals *php_mb_regex_globals_new(TSRMLS_D);
+zend_mb_regex_globals *php_mb_regex_globals_alloc(TSRMLS_D);
 void php_mb_regex_globals_free(zend_mb_regex_globals *pglobals TSRMLS_DC);
 int php_mb_regex_set_mbctype(const char *enc TSRMLS_DC);
 int php_mb_regex_set_default_mbctype(const char *encname 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) /ext/standard basic_functions.c /ext/standard/tests/general_functions bug41037.phpt closures_002.phpt ZendEngine2 zend_compile.c ZendEngine2/tests bug43027.phpt jump

2008-07-17 Thread Felipe Pena
felipe  Thu Jul 17 19:29:34 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/ZendEngine2zend_compile.c 
/ZendEngine2/tests  bug43027.phpt jump12.phpt 
/php-src/ext/standard   basic_functions.c 
/php-src/ext/standard/tests/general_functions   bug41037.phpt 
closures_002.phpt 
  Log:
  - Deprecate ticks
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.72&r2=1.647.2.27.2.41.2.73&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.72 
ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.73
--- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.72 Mon Jul 14 12:18:20 2008
+++ ZendEngine2/zend_compile.c  Thu Jul 17 19:29:34 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.72 2008/07/14 12:18:20 dmitry Exp $ 
*/
+/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.73 2008/07/17 19:29:34 felipe Exp $ 
*/
 
 #include 
 #include "zend.h"
@@ -4592,6 +4592,8 @@
if (!zend_binary_strcasecmp(var->u.constant.value.str.val, 
var->u.constant.value.str.len, "ticks", sizeof("ticks")-1)) {
convert_to_long(&val->u.constant);
CG(declarables).ticks = val->u.constant;
+   
+   zend_error(E_DEPRECATED, "Ticks is deprecated and will be 
removed in PHP 6");
 #ifdef ZEND_MULTIBYTE
} else if (!zend_binary_strcasecmp(var->u.constant.value.str.val, 
var->u.constant.value.str.len, "encoding", sizeof("encoding")-1)) {
zend_encoding *new_encoding, *old_encoding;
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug43027.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: ZendEngine2/tests/bug43027.phpt
diff -u ZendEngine2/tests/bug43027.phpt:1.1.2.1 
ZendEngine2/tests/bug43027.phpt:1.1.2.2
--- ZendEngine2/tests/bug43027.phpt:1.1.2.1 Thu Nov  1 11:58:58 2007
+++ ZendEngine2/tests/bug43027.phpt Thu Jul 17 19:29:34 2008
@@ -6,5 +6,6 @@
 namespace test;
 echo "ok\n";
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
 ok
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/jump12.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: ZendEngine2/tests/jump12.phpt
diff -u ZendEngine2/tests/jump12.phpt:1.1.2.2 
ZendEngine2/tests/jump12.phpt:1.1.2.3
--- ZendEngine2/tests/jump12.phpt:1.1.2.2   Fri Mar 28 14:35:01 2008
+++ ZendEngine2/tests/jump12.phpt   Thu Jul 17 19:29:34 2008
@@ -13,7 +13,8 @@
 print "ok!\n";
 goto b;
 ?>
---EXPECT--
+--EXPECTF--
+Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
 ok!
 ok!
 ok!
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.36&r2=1.725.2.31.2.64.2.37&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.36 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.37
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.36 Thu Jul 17 
09:53:42 2008
+++ php-src/ext/standard/basic_functions.c  Thu Jul 17 19:29:34 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.36 2008/07/17 09:53:42 dmitry 
Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.37 2008/07/17 19:29:34 felipe 
Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -6031,6 +6031,8 @@
if (tick_fe.arg_count < 1) {
WRONG_PARAM_COUNT;
}
+   
+   php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "Ticks is deprecated and 
will be removed in PHP 6");
 
tick_fe.arguments = (zval **) safe_emalloc(sizeof(zval *), 
tick_fe.arg_count, 0);
 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug41037.phpt?r1=1.1.2.2&r2=1.1.2.2.2.1&diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug41037.phpt
diff -u php-src/ext/standard/tests/general_functions/bug41037.phpt:1.1.2.2 
php-src/ext/standard/tests/general_functions/bug41037.phpt:1.1.2.2.2.1
--- php-src/ext/standard/tests/general_functions/bug41037.phpt:1.1.2.2  Tue Apr 
10 09:37:09 2007
+++ php-src/ext/standard/tests/general_functions/bug41037.phpt  Thu Jul 17 
19:29:34 2008
@@ -14,6 +14,9 @@
 echo "Done\n";
 ?>
 --EXPECTF--
+Deprecated: Ticks is deprecated and will be removed in PHP 6 in %s on line %d
+
+Deprecated: register_tick_function(): Ticks is deprecated and will be removed 
in PHP 6 in %s on line %d
 hello
 Warning: unregister_tick_function(): Unable to delete tick function executed 
at the moment in %s on line %d
 Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/closures_002.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/general_functions/closures_002.phpt
diff -u php-src/ext/standard/test

[PHP-CVS] cvs: php-src(PHP_4_4) / NEWS /ext/gd gd.c /ext/gd/tests imageloadfont_invalid.phpt

2008-07-17 Thread Pierre-Alain Joye
pajoye  Thu Jul 17 18:08:05 2008 UTC

  Added files: (Branch: PHP_4_4)
/php-src/ext/gd/tests   imageloadfont_invalid.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/gd gd.c 
  Log:
  - fix crash when some crafted font are given
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.1247.2.920.2.248&r2=1.1247.2.920.2.249&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.920.2.248 php-src/NEWS:1.1247.2.920.2.249
--- php-src/NEWS:1.1247.2.920.2.248 Thu Jul 17 14:27:52 2008
+++ php-src/NEWSThu Jul 17 18:08:04 2008
@@ -2,6 +2,8 @@
 |||
 ?? ?? 2008, Version 4.4.9
 - Updated PCRE to version 7.7. (Nuno)
+- Fixed crash in imageloadfont when an invalid font is given
+  (discovered by CzechSec, fixed by Pierre)
 
 03 Jan 2008, Version 4.4.8
 - Improved fix for MOPB-02-2007. (Ilia)
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.221.2.56.2.6&r2=1.221.2.56.2.7&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.221.2.56.2.6 php-src/ext/gd/gd.c:1.221.2.56.2.7
--- php-src/ext/gd/gd.c:1.221.2.56.2.6  Mon Dec 31 07:22:47 2007
+++ php-src/ext/gd/gd.c Thu Jul 17 18:08:04 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.221.2.56.2.6 2007/12/31 07:22:47 sebastian Exp $ */
+/* $Id: gd.c,v 1.221.2.56.2.7 2008/07/17 18:08:04 pajoye Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, 
Cold Spring Harbor Labs. */
@@ -669,6 +669,19 @@
body_size = font->w * font->h * font->nchars;
}
 
+   if (overflow2(font->nchars, font->h)) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading 
font, invalid font header");
+   efree(font);
+   php_stream_close(stream);
+   RETURN_FALSE;
+   }
+   if (overflow2(font->nchars * font->h, font->w )) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading 
font, invalid font header");
+   efree(font);
+   php_stream_close(stream);
+   RETURN_FALSE;
+   }
+
if (body_size != body_size_check) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading 
font");
efree(font);

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



-- 
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) /win32 crypt_win32.c

2008-07-17 Thread Pierre-Alain Joye
pajoye  Thu Jul 17 17:31:35 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/win32  crypt_win32.c 
  Log:
  - MFH: CS/WS
  http://cvs.php.net/viewvc.cgi/php-src/win32/crypt_win32.c?r1=1.8.2.1.2.1&r2=1.8.2.1.2.1.2.1&diff_format=u
Index: php-src/win32/crypt_win32.c
diff -u php-src/win32/crypt_win32.c:1.8.2.1.2.1 
php-src/win32/crypt_win32.c:1.8.2.1.2.1.2.1
--- php-src/win32/crypt_win32.c:1.8.2.1.2.1 Fri Jun 16 05:57:18 2006
+++ php-src/win32/crypt_win32.c Thu Jul 17 17:31:35 2008
@@ -31,95 +31,96 @@
 /* Permutation done once on the 56 bit 
key derived from the original 8 byte ASCII key.
 */
-static unsigned long pc1[56] =
-  { 57, 49, 41, 33, 25, 17,  9,  1, 58, 50, 42, 34, 26, 18,
-10,  2, 59, 51, 43, 35, 27, 19, 11,  3, 60, 52, 44, 36,
-63, 55, 47, 39, 31, 23, 15,  7, 62, 54, 46, 38, 30, 22,
-14,  6, 61, 53, 45, 37, 29, 21, 13,  5, 28, 20, 12,  4
-  };
+static unsigned long pc1[56] = {
+   57, 49, 41, 33, 25, 17,  9,  1, 58, 50, 42, 34, 26, 18,
+   10,  2, 59, 51, 43, 35, 27, 19, 11,  3, 60, 52, 44, 36,
+   63, 55, 47, 39, 31, 23, 15,  7, 62, 54, 46, 38, 30, 22,
+   14,  6, 61, 53, 45, 37, 29, 21, 13,  5, 28, 20, 12,  4
+   };
 
 /* How much to rotate each 28 bit half of the pc1 permutated
56 bit key before using pc2 to give the i' key
 */
 static unsigned long totrot[16] =
-  { 1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28 };
+   { 1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28 };
 
 /* Permutation giving the key of the i' DES round */
-static unsigned long pc2[48] =
-  { 14, 17, 11, 24,  1,  5,  3, 28, 15,  6, 21, 10,
-23, 19, 12,  4, 26,  8, 16,  7, 27, 20, 13,  2,
-41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48,
-44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32
-  };
+static unsigned long pc2[48] = { 
+   14, 17, 11, 24,  1,  5,  3, 28, 15,  6, 21, 10,
+   23, 19, 12,  4, 26,  8, 16,  7, 27, 20, 13,  2,
+   41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48,
+   44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32
+   };
 
 /* Reference copy of the expansion table which selects
bits from the 32 bit intermediate result.
 */
-static unsigned long eref[48] =
-  { 32,  1,  2,  3,  4,  5,  4,  5,  6,  7,  8,  9,
- 8,  9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17,
-16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25,
-24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32,  1
-  };
+static unsigned long eref[48] = {
+   32,  1,  2,  3,  4,  5,  4,  5,  6,  7,  8,  9,
+8,  9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17,
+   16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25,
+   24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32,  1
+};
+
 static unsigned long disturbed_e[48];
 static unsigned long e_inverse[64];
 
 /* Permutation done on the result of sbox lookups */
-static unsigned long perm32[32] = 
-  { 16,  7, 20, 21, 29, 12, 28, 17,  1, 15, 23, 26,  5, 18, 31, 10,
- 2,  8, 24, 14, 32, 27,  3,  9, 19, 13, 30,  6, 22, 11,  4, 25
-  };
+static unsigned long perm32[32] = {
+   16,  7, 20, 21, 29, 12, 28, 17,  1, 15, 23, 26,  5, 18, 31, 10,
+   2,  8, 24, 14, 32, 27,  3,  9, 19, 13, 30,  6, 22, 11,  4, 25
+};
 
 /* The sboxes */
 static unsigned long sbox[8][4][16]=
-  { { { 14,  4, 13,  1,  2, 15, 11,  8,  3, 10,  6, 12,  5,  9,  0,  7 },
-  {  0, 15,  7,  4, 14,  2, 13,  1, 10,  6, 12, 11,  9,  5,  3,  8 },
-  {  4,  1, 14,  8, 13,  6,  2, 11, 15, 12,  9,  7,  3, 10,  5,  0 },
-  { 15, 12,  8,  2,  4,  9,  1,  7,  5, 11,  3, 14, 10,  0,  6, 13 }
-},
-
-{ { 15,  1,  8, 14,  6, 11,  3,  4,  9,  7,  2, 13, 12,  0,  5, 10 },
-  {  3, 13,  4,  7, 15,  2,  8, 14, 12,  0,  1, 10,  6,  9, 11,  5 },
-  {  0, 14,  7, 11, 10,  4, 13,  1,  5,  8, 12,  6,  9,  3,  2, 15 },
-  { 13,  8, 10,  1,  3, 15,  4,  2, 11,  6,  7, 12,  0,  5, 14,  9 }
-},
-
-{ { 10,  0,  9, 14,  6,  3, 15,  5,  1, 13, 12,  7, 11,  4,  2,  8 },
-  { 13,  7,  0,  9,  3,  4,  6, 10,  2,  8,  5, 14, 12, 11, 15,  1 },
-  { 13,  6,  4,  9,  8, 15,  3,  0, 11,  1,  2, 12,  5, 10, 14,  7 },
-  {  1, 10, 13,  0,  6,  9,  8,  7,  4, 15, 14,  3, 11,  5,  2, 12 }
-},
-
-{ {  7,  13, 14,  3,  0,  6,  9, 10,  1,  2,  8,  5, 11, 12,  4, 15 },
-  { 13,  8,  11,  5,  6, 15,  0,  3,  4,  7,  2, 12,  1, 10, 14,  9 },
-  { 10,  6,   9,  0, 12, 11,  7, 13, 15,  1,  3, 14,  5,  2,  8,  4 },
-  {  3, 15,   0,  6, 10,  1, 13,  8,  9,  4,  5, 11, 12,  7,  2, 14 }
-},
-
-{ {  2, 12,   4,  1,  7, 10, 11,  6,  8,  5,  3, 15, 13,  0, 14,  9 },
-  { 14, 11,   2, 12,  4,  7, 13,  1,  5,  0, 15, 10,  3,  9,  8,  6 },
-  {  4,  2,   1, 11, 10, 13,  7,  8, 15,  9, 12,  5,  6,  3,  0, 14 },
-  { 11,  8,  12,  7,  1, 14,  2, 13,  6, 15,  0,  9, 10,  4,  5,  3 }
-},
-
-{ { 12,  1, 10, 15,  9,  2,  6,  8,  0, 13,  3,  4, 14,  7,  5, 11 },
-   

[PHP-CVS] cvs: php-src /win32 crypt_win32.c

2008-07-17 Thread Pierre-Alain Joye
pajoye  Thu Jul 17 17:31:15 2008 UTC

  Modified files:  
/php-src/win32  crypt_win32.c 
  Log:
  - CS/WS
  http://cvs.php.net/viewvc.cgi/php-src/win32/crypt_win32.c?r1=1.10&r2=1.11&diff_format=u
Index: php-src/win32/crypt_win32.c
diff -u php-src/win32/crypt_win32.c:1.10 php-src/win32/crypt_win32.c:1.11
--- php-src/win32/crypt_win32.c:1.10Fri Jun 16 05:57:41 2006
+++ php-src/win32/crypt_win32.c Thu Jul 17 17:31:15 2008
@@ -31,95 +31,96 @@
 /* Permutation done once on the 56 bit 
key derived from the original 8 byte ASCII key.
 */
-static unsigned long pc1[56] =
-  { 57, 49, 41, 33, 25, 17,  9,  1, 58, 50, 42, 34, 26, 18,
-10,  2, 59, 51, 43, 35, 27, 19, 11,  3, 60, 52, 44, 36,
-63, 55, 47, 39, 31, 23, 15,  7, 62, 54, 46, 38, 30, 22,
-14,  6, 61, 53, 45, 37, 29, 21, 13,  5, 28, 20, 12,  4
-  };
+static unsigned long pc1[56] = {
+   57, 49, 41, 33, 25, 17,  9,  1, 58, 50, 42, 34, 26, 18,
+   10,  2, 59, 51, 43, 35, 27, 19, 11,  3, 60, 52, 44, 36,
+   63, 55, 47, 39, 31, 23, 15,  7, 62, 54, 46, 38, 30, 22,
+   14,  6, 61, 53, 45, 37, 29, 21, 13,  5, 28, 20, 12,  4
+   };
 
 /* How much to rotate each 28 bit half of the pc1 permutated
56 bit key before using pc2 to give the i' key
 */
 static unsigned long totrot[16] =
-  { 1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28 };
+   { 1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28 };
 
 /* Permutation giving the key of the i' DES round */
-static unsigned long pc2[48] =
-  { 14, 17, 11, 24,  1,  5,  3, 28, 15,  6, 21, 10,
-23, 19, 12,  4, 26,  8, 16,  7, 27, 20, 13,  2,
-41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48,
-44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32
-  };
+static unsigned long pc2[48] = { 
+   14, 17, 11, 24,  1,  5,  3, 28, 15,  6, 21, 10,
+   23, 19, 12,  4, 26,  8, 16,  7, 27, 20, 13,  2,
+   41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48,
+   44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32
+   };
 
 /* Reference copy of the expansion table which selects
bits from the 32 bit intermediate result.
 */
-static unsigned long eref[48] =
-  { 32,  1,  2,  3,  4,  5,  4,  5,  6,  7,  8,  9,
- 8,  9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17,
-16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25,
-24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32,  1
-  };
+static unsigned long eref[48] = {
+   32,  1,  2,  3,  4,  5,  4,  5,  6,  7,  8,  9,
+8,  9, 10, 11, 12, 13, 12, 13, 14, 15, 16, 17,
+   16, 17, 18, 19, 20, 21, 20, 21, 22, 23, 24, 25,
+   24, 25, 26, 27, 28, 29, 28, 29, 30, 31, 32,  1
+};
+
 static unsigned long disturbed_e[48];
 static unsigned long e_inverse[64];
 
 /* Permutation done on the result of sbox lookups */
-static unsigned long perm32[32] = 
-  { 16,  7, 20, 21, 29, 12, 28, 17,  1, 15, 23, 26,  5, 18, 31, 10,
- 2,  8, 24, 14, 32, 27,  3,  9, 19, 13, 30,  6, 22, 11,  4, 25
-  };
+static unsigned long perm32[32] = {
+   16,  7, 20, 21, 29, 12, 28, 17,  1, 15, 23, 26,  5, 18, 31, 10,
+   2,  8, 24, 14, 32, 27,  3,  9, 19, 13, 30,  6, 22, 11,  4, 25
+};
 
 /* The sboxes */
 static unsigned long sbox[8][4][16]=
-  { { { 14,  4, 13,  1,  2, 15, 11,  8,  3, 10,  6, 12,  5,  9,  0,  7 },
-  {  0, 15,  7,  4, 14,  2, 13,  1, 10,  6, 12, 11,  9,  5,  3,  8 },
-  {  4,  1, 14,  8, 13,  6,  2, 11, 15, 12,  9,  7,  3, 10,  5,  0 },
-  { 15, 12,  8,  2,  4,  9,  1,  7,  5, 11,  3, 14, 10,  0,  6, 13 }
-},
-
-{ { 15,  1,  8, 14,  6, 11,  3,  4,  9,  7,  2, 13, 12,  0,  5, 10 },
-  {  3, 13,  4,  7, 15,  2,  8, 14, 12,  0,  1, 10,  6,  9, 11,  5 },
-  {  0, 14,  7, 11, 10,  4, 13,  1,  5,  8, 12,  6,  9,  3,  2, 15 },
-  { 13,  8, 10,  1,  3, 15,  4,  2, 11,  6,  7, 12,  0,  5, 14,  9 }
-},
-
-{ { 10,  0,  9, 14,  6,  3, 15,  5,  1, 13, 12,  7, 11,  4,  2,  8 },
-  { 13,  7,  0,  9,  3,  4,  6, 10,  2,  8,  5, 14, 12, 11, 15,  1 },
-  { 13,  6,  4,  9,  8, 15,  3,  0, 11,  1,  2, 12,  5, 10, 14,  7 },
-  {  1, 10, 13,  0,  6,  9,  8,  7,  4, 15, 14,  3, 11,  5,  2, 12 }
-},
-
-{ {  7,  13, 14,  3,  0,  6,  9, 10,  1,  2,  8,  5, 11, 12,  4, 15 },
-  { 13,  8,  11,  5,  6, 15,  0,  3,  4,  7,  2, 12,  1, 10, 14,  9 },
-  { 10,  6,   9,  0, 12, 11,  7, 13, 15,  1,  3, 14,  5,  2,  8,  4 },
-  {  3, 15,   0,  6, 10,  1, 13,  8,  9,  4,  5, 11, 12,  7,  2, 14 }
-},
-
-{ {  2, 12,   4,  1,  7, 10, 11,  6,  8,  5,  3, 15, 13,  0, 14,  9 },
-  { 14, 11,   2, 12,  4,  7, 13,  1,  5,  0, 15, 10,  3,  9,  8,  6 },
-  {  4,  2,   1, 11, 10, 13,  7,  8, 15,  9, 12,  5,  6,  3,  0, 14 },
-  { 11,  8,  12,  7,  1, 14,  2, 13,  6, 15,  0,  9, 10,  4,  5,  3 }
-},
-
-{ { 12,  1, 10, 15,  9,  2,  6,  8,  0, 13,  3,  4, 14,  7,  5, 11 },
-  { 10, 15,  4,  2,  7, 12,  9,  5,  6,  1, 13, 14,  0, 11,  3,  8

[PHP-CVS] cvs: php-src /ext/pdo_sqlite/sqlite/src limits.h

2008-07-17 Thread Scott MacVicar
scottmacThu Jul 17 17:25:34 2008 UTC

  Removed files:   
/php-src/ext/pdo_sqlite/sqlite/src  limits.h 
  Log:
  MFB: This file isn't needed any more
  



-- 
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/pdo_sqlite/sqlite/src limits.h

2008-07-17 Thread Scott MacVicar
scottmacThu Jul 17 17:24:26 2008 UTC

  Removed files:   (Branch: PHP_5_3)
/php-src/ext/pdo_sqlite/sqlite/src  limits.h 
  Log:
  This file isn't needed any more
  



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



[PHP-CVS] cvs: CVSROOT / avail

2008-07-17 Thread Rasmus Lerdorf
rasmus  Thu Jul 17 16:48:27 2008 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  Karma for Arnaud Le Blanc
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1422&r2=1.1423&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1422 CVSROOT/avail:1.1423
--- CVSROOT/avail:1.1422Wed Jul 16 16:37:46 2008
+++ CVSROOT/avail   Thu Jul 17 16:48:27 2008
@@ -293,6 +293,7 @@
 avail|joonas|pecl/llvm
 avail|indeyets|pecl/spread
 avail|akshat|pecl/cairo
+avail|lbarnaud|pecl/inotify
 
 # Objective-C bridge
 avail|wez,jan|php-objc



-- 
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/mbstring/tests bug20087.phpt htmlent.phpt mb_convert_encoding.phpt mb_convert_variables.phpt mb_detect_encoding.phpt mb_detect_order.phpt mb_http_input.phpt mb_htt

2008-07-17 Thread Moriyoshi Koizumi
moriyoshi   Thu Jul 17 16:30:32 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mbstring/tests bug20087.phpt htmlent.phpt 
mb_convert_encoding.phpt 
mb_convert_variables.phpt 
mb_detect_encoding.phpt 
mb_detect_order.phpt mb_http_input.phpt 
mb_http_output.phpt 
mb_internal_encoding.phpt 
mb_preferred_mime_name.phpt 
mb_strcut.phpt mb_strimwidth.phpt 
mb_strlen.phpt mb_strpos.phpt 
mb_strwidth.phpt 
mb_substitute_character.phpt 
mb_substr.phpt 
  Log:
  - Fix include_path.
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/bug20087.phpt?r1=1.3&r2=1.3.22.1&diff_format=u
Index: php-src/ext/mbstring/tests/bug20087.phpt
diff -u php-src/ext/mbstring/tests/bug20087.phpt:1.3 
php-src/ext/mbstring/tests/bug20087.phpt:1.3.22.1
--- php-src/ext/mbstring/tests/bug20087.phpt:1.3Wed Oct 30 08:06:52 2002
+++ php-src/ext/mbstring/tests/bug20087.phptThu Jul 17 16:30:32 2008
@@ -4,7 +4,7 @@
 
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/htmlent.phpt?r1=1.6&r2=1.6.6.1&diff_format=u
Index: php-src/ext/mbstring/tests/htmlent.phpt
diff -u php-src/ext/mbstring/tests/htmlent.phpt:1.6 
php-src/ext/mbstring/tests/htmlent.phpt:1.6.6.1
--- php-src/ext/mbstring/tests/htmlent.phpt:1.6 Sat Oct  9 08:16:29 2004
+++ php-src/ext/mbstring/tests/htmlent.phpt Thu Jul 17 16:30:32 2008
@@ -2,7 +2,7 @@
 HTML input/output
 --SKIPIF--
 
 --INI--
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_convert_encoding.phpt?r1=1.4&r2=1.4.8.1&diff_format=u
Index: php-src/ext/mbstring/tests/mb_convert_encoding.phpt
diff -u php-src/ext/mbstring/tests/mb_convert_encoding.phpt:1.4 
php-src/ext/mbstring/tests/mb_convert_encoding.phpt:1.4.8.1
--- php-src/ext/mbstring/tests/mb_convert_encoding.phpt:1.4 Fri Sep 26 
14:42:37 2003
+++ php-src/ext/mbstring/tests/mb_convert_encoding.phpt Thu Jul 17 16:30:32 2008
@@ -9,7 +9,7 @@
 http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_convert_variables.phpt?r1=1.5&r2=1.5.8.1&diff_format=u
Index: php-src/ext/mbstring/tests/mb_convert_variables.phpt
diff -u php-src/ext/mbstring/tests/mb_convert_variables.phpt:1.5 
php-src/ext/mbstring/tests/mb_convert_variables.phpt:1.5.8.1
--- php-src/ext/mbstring/tests/mb_convert_variables.phpt:1.5Sun Nov 30 
13:20:26 2003
+++ php-src/ext/mbstring/tests/mb_convert_variables.phptThu Jul 17 
16:30:32 2008
@@ -9,7 +9,7 @@
 http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_detect_encoding.phpt?r1=1.3&r2=1.3.8.1&diff_format=u
Index: php-src/ext/mbstring/tests/mb_detect_encoding.phpt
diff -u php-src/ext/mbstring/tests/mb_detect_encoding.phpt:1.3 
php-src/ext/mbstring/tests/mb_detect_encoding.phpt:1.3.8.1
--- php-src/ext/mbstring/tests/mb_detect_encoding.phpt:1.3  Fri Sep 26 
14:42:37 2003
+++ php-src/ext/mbstring/tests/mb_detect_encoding.phpt  Thu Jul 17 16:30:32 2008
@@ -8,7 +8,7 @@
 http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_detect_order.phpt?r1=1.3&r2=1.3.8.1&diff_format=u
Index: php-src/ext/mbstring/tests/mb_detect_order.phpt
diff -u php-src/ext/mbstring/tests/mb_detect_order.phpt:1.3 
php-src/ext/mbstring/tests/mb_detect_order.phpt:1.3.8.1
--- php-src/ext/mbstring/tests/mb_detect_order.phpt:1.3 Fri Sep 26 14:42:37 2003
+++ php-src/ext/mbstring/tests/mb_detect_order.phpt Thu Jul 17 16:30:32 2008
@@ -7,7 +7,7 @@
 --FILE--
 http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_http_input.phpt?r1=1.3&r2=1.3.8.1&diff_format=u
Index: php-src/ext/mbstring/tests/mb_http_input.phpt
diff -u php-src/ext/mbstring/tests/mb_http_input.phpt:1.3 
php-src/ext/mbstring/tests/mb_http_input.phpt:1.3.8.1
--- php-src/ext/mbstring/tests/mb_http_input.phpt:1.3   Sun Aug  3 13:58:20 2003
+++ php-src/ext/mbstring/tests/mb_http_input.phpt   Thu Jul 17 16:30:32 2008
@@ -14,7 +14,7 @@
 http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_http_output.phpt?r1=1.3&r2=1.3.8.1&diff_format=u
Index: php-src/ext/mbstring/tests/mb_http_output.phpt
diff -u php-src/ext/mbstring/tests/mb_http_output.phpt:1.3 
php-src/ext/mbstring/tests/mb_http_output.phpt:1.3.8.1
--- php-src/ext/mbstring/tests/mb_http_output.phpt:1.3  Mon Feb  3 20:29:07 2003
+++ php-src/ext/mbstring/tests/mb_http_output.phpt  Thu Jul 17 16:30:32 2008
@@ -6,7 +6,7 @@
 http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/mb_internal_encoding.phpt?r1=1.3&r2=1.3.8.1&diff_format=u
Index: php-src/ext/mbstring/tests/mb_internal_encoding.phpt
diff -u php-src/ext/mbstring/tests/mb_internal_encoding.phpt:1.3 
php-src/ext/mbstring/tests/mb_internal_encoding.phpt:1.3.8.1
--- php-src/ext/mbstring/tests/mb_internal_enco

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

2008-07-17 Thread Moriyoshi Koizumi
moriyoshi   Thu Jul 17 16:08:37 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/mbstring   mbstring.c mbstring.h php_mbregex.c 
php_mbregex.h 
  Log:
  - MFH: Removed dependencies from php_mbregex to oniguruma types
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.22.2.25.2.17&r2=1.224.2.22.2.25.2.18&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.17 
php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.18
--- php-src/ext/mbstring/mbstring.c:1.224.2.22.2.25.2.17Wed Jul 16 
02:30:48 2008
+++ php-src/ext/mbstring/mbstring.c Thu Jul 17 16:08:37 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.224.2.22.2.25.2.17 2008/07/16 02:30:48 moriyoshi Exp $ 
*/
+/* $Id: mbstring.c,v 1.224.2.22.2.25.2.18 2008/07/17 16:08:37 moriyoshi Exp $ 
*/
 
 /*
  * PHP 4 Multibyte String module "mbstring"
@@ -73,6 +73,10 @@
 
 #include "mb_gpc.h"
 
+#if HAVE_MBREGEX
+#include "php_mbregex.h"
+#endif
+
 #ifdef ZEND_MULTIBYTE
 #include "zend_multibyte.h"
 #endif /* ZEND_MULTIBYTE */
@@ -89,7 +93,7 @@
 /* {{{ php_mb_default_identify_list */
 typedef struct _php_mb_nls_ident_list {
enum mbfl_no_language lang;
-   enum mbfl_no_encoding* list;
+   const enum mbfl_no_encoding* list;
int list_size;
 } php_mb_nls_ident_list;
 
@@ -906,7 +910,7 @@
 
for (i = 0; i < sizeof(php_mb_default_identify_list) / 
sizeof(php_mb_default_identify_list[0]); i++) {
if (php_mb_default_identify_list[i].lang == lang) {
-   *plist = php_mb_default_identify_list[i].list;
+   *plist = (enum mbfl_no_encoding 
*)php_mb_default_identify_list[i].list;
*plist_size = php_mb_default_identify_list[i].list_size;
return 1;
}
@@ -1003,12 +1007,13 @@
MBSTRG(current_internal_encoding) = no_encoding;
 #if HAVE_MBREGEX
{
-   OnigEncoding mbctype;
-   mbctype = php_mb_regex_name2mbctype(new_value);
-   if (mbctype == ONIG_ENCODING_UNDEF) {
-   mbctype = ONIG_ENCODING_EUC_JP;
-   }
-   MBSTRG(current_mbctype) = MBSTRG(default_mbctype) = 
mbctype;
+   const char *enc_name = new_value;
+   if (FAILURE == 
php_mb_regex_set_default_mbctype(enc_name)) {
+   /* falls back to EUC-JP if an unknown encoding 
name is given */
+   enc_name = "EUC-JP";
+   php_mb_regex_set_default_mbctype(enc_name);
+   }
+   php_mb_regex_set_mbctype(new_value);
}
 #endif
 #ifdef ZEND_MULTIBYTE
@@ -1159,7 +1164,7 @@
mbstring_globals->strict_detection = 0;
mbstring_globals->outconv = NULL;
 #if HAVE_MBREGEX
-   _php_mb_regex_globals_ctor(mbstring_globals TSRMLS_CC);
+   mbstring_globals->mb_regex_globals = 
php_mb_regex_globals_alloc(TSRMLS_C);
 #endif
 }
 /* }}} */
@@ -1168,7 +1173,7 @@
 static PHP_GSHUTDOWN_FUNCTION(mbstring)
 {
 #if HAVE_MBREGEX
-   _php_mb_regex_globals_dtor(mbstring_globals TSRMLS_CC);
+   php_mb_regex_globals_free(mbstring_globals->mb_regex_globals TSRMLS_CC);
 #endif
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.h?r1=1.66.2.4.2.5.2.2&r2=1.66.2.4.2.5.2.3&diff_format=u
Index: php-src/ext/mbstring/mbstring.h
diff -u php-src/ext/mbstring/mbstring.h:1.66.2.4.2.5.2.2 
php-src/ext/mbstring/mbstring.h:1.66.2.4.2.5.2.3
--- php-src/ext/mbstring/mbstring.h:1.66.2.4.2.5.2.2Wed Jan 30 09:41:12 2008
+++ php-src/ext/mbstring/mbstring.h Thu Jul 17 16:08:37 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: mbstring.h,v 1.66.2.4.2.5.2.2 2008/01/30 09:41:12 dmitry Exp $ */
+/* $Id: mbstring.h,v 1.66.2.4.2.5.2.3 2008/07/17 16:08:37 moriyoshi Exp $ */
 
 /*
  * PHP 4 Multibyte String module "mbstring" (currently only for Japanese)
@@ -76,10 +76,6 @@
 
 #define PHP_MBSTRING_API 20021024
 
-#if HAVE_MBREGEX
-#include "php_mbregex.h"
-#endif
-
 extern zend_module_entry mbstring_module_entry;
 #define mbstring_module_ptr &mbstring_module_entry
 
@@ -197,8 +193,8 @@
long strict_detection;
long illegalchars;
mbfl_buffer_converter *outconv;
-#if HAVE_MBREGEX && defined(PHP_MBREGEX_GLOBALS)
-   PHP_MBREGEX_GLOBALS 
+#if HAVE_MBREGEX
+struct _zend_mb_regex_globals *mb_regex_globals;
 #endif
 ZEND_END_MODULE_GLOBALS(mbstring)
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/php_mbregex.c?r1=1.53.2.1.2.4.2.8&r2=1.53.2.1.2.4.2.9&diff_format=u
Index: php-src/ext/mbstring/php_mbregex.c
diff -u php-src/ext/mbstri

[PHP-CVS] cvs: php-src /ext/mbstring mbstring.c mbstring.h php_mbregex.c php_mbregex.h

2008-07-17 Thread Moriyoshi Koizumi
moriyoshi   Thu Jul 17 16:08:09 2008 UTC

  Modified files:  
/php-src/ext/mbstring   mbstring.c mbstring.h php_mbregex.c 
php_mbregex.h 
  Log:
  - Removed dependencies from php_mbregex to oniguruma types
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.c?r1=1.284&r2=1.285&diff_format=u
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.284 
php-src/ext/mbstring/mbstring.c:1.285
--- php-src/ext/mbstring/mbstring.c:1.284   Wed Jul 16 02:29:14 2008
+++ php-src/ext/mbstring/mbstring.c Thu Jul 17 16:08:08 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: mbstring.c,v 1.284 2008/07/16 02:29:14 moriyoshi Exp $ */
+/* $Id: mbstring.c,v 1.285 2008/07/17 16:08:08 moriyoshi Exp $ */
 
 /*
  * PHP 4 Multibyte String module "mbstring"
@@ -73,6 +73,10 @@
 
 #include "mb_gpc.h"
 
+#if HAVE_MBREGEX
+#include "php_mbregex.h"
+#endif
+
 #ifdef ZEND_MULTIBYTE
 #include "zend_multibyte.h"
 #endif /* ZEND_MULTIBYTE */
@@ -89,7 +93,7 @@
 /* {{{ php_mb_default_identify_list */
 typedef struct _php_mb_nls_ident_list {
enum mbfl_no_language lang;
-   enum mbfl_no_encoding* list;
+   const enum mbfl_no_encoding* list;
int list_size;
 } php_mb_nls_ident_list;
 
@@ -911,7 +915,7 @@
 
for (i = 0; i < sizeof(php_mb_default_identify_list) / 
sizeof(php_mb_default_identify_list[0]); i++) {
if (php_mb_default_identify_list[i].lang == lang) {
-   *plist = php_mb_default_identify_list[i].list;
+   *plist = (enum mbfl_no_encoding 
*)php_mb_default_identify_list[i].list;
*plist_size = php_mb_default_identify_list[i].list_size;
return 1;
}
@@ -1008,12 +1012,13 @@
MBSTRG(current_internal_encoding) = no_encoding;
 #if HAVE_MBREGEX
{
-   OnigEncoding mbctype;
-   mbctype = php_mb_regex_name2mbctype(new_value);
-   if (mbctype == ONIG_ENCODING_UNDEF) {
-   mbctype = ONIG_ENCODING_EUC_JP;
-   }
-   MBSTRG(current_mbctype) = MBSTRG(default_mbctype) = 
mbctype;
+   const char *enc_name = new_value;
+   if (FAILURE == 
php_mb_regex_set_default_mbctype(enc_name)) {
+   /* falls back to EUC-JP if an unknown encoding 
name is given */
+   enc_name = "EUC-JP";
+   php_mb_regex_set_default_mbctype(enc_name);
+   }
+   php_mb_regex_set_mbctype(new_value);
}
 #endif
 #ifdef ZEND_MULTIBYTE
@@ -1164,7 +1169,7 @@
mbstring_globals->strict_detection = 0;
mbstring_globals->outconv = NULL;
 #if HAVE_MBREGEX
-   _php_mb_regex_globals_ctor(mbstring_globals TSRMLS_CC);
+   mbstring_globals->mb_regex_globals = 
php_mb_regex_globals_alloc(TSRMLS_C);
 #endif
 }
 /* }}} */
@@ -1173,7 +1178,7 @@
 static PHP_GSHUTDOWN_FUNCTION(mbstring)
 {
 #if HAVE_MBREGEX
-   _php_mb_regex_globals_dtor(mbstring_globals TSRMLS_CC);
+   php_mb_regex_globals_free(mbstring_globals->mb_regex_globals TSRMLS_CC);
 #endif
 }
 /* }}} */
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/mbstring.h?r1=1.79&r2=1.80&diff_format=u
Index: php-src/ext/mbstring/mbstring.h
diff -u php-src/ext/mbstring/mbstring.h:1.79 
php-src/ext/mbstring/mbstring.h:1.80
--- php-src/ext/mbstring/mbstring.h:1.79Wed Jan 30 09:56:21 2008
+++ php-src/ext/mbstring/mbstring.h Thu Jul 17 16:08:08 2008
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: mbstring.h,v 1.79 2008/01/30 09:56:21 dmitry Exp $ */
+/* $Id: mbstring.h,v 1.80 2008/07/17 16:08:08 moriyoshi Exp $ */
 
 /*
  * PHP 4 Multibyte String module "mbstring" (currently only for Japanese)
@@ -76,10 +76,6 @@
 
 #define PHP_MBSTRING_API 20021024
 
-#if HAVE_MBREGEX
-#include "php_mbregex.h"
-#endif
-
 extern zend_module_entry mbstring_module_entry;
 #define mbstring_module_ptr &mbstring_module_entry
 
@@ -197,8 +193,8 @@
long strict_detection;
long illegalchars;
mbfl_buffer_converter *outconv;
-#if HAVE_MBREGEX && defined(PHP_MBREGEX_GLOBALS)
-   PHP_MBREGEX_GLOBALS 
+#if HAVE_MBREGEX
+struct _zend_mb_regex_globals *mb_regex_globals;
 #endif
 ZEND_END_MODULE_GLOBALS(mbstring)
 
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/php_mbregex.c?r1=1.62&r2=1.63&diff_format=u
Index: php-src/ext/mbstring/php_mbregex.c
diff -u php-src/ext/mbstring/php_mbregex.c:1.62 
php-src/ext/mbstring/php_mbregex.c:1.63
--- php-src/ext/mbstring/php_mbregex.c:1.62 Wed Jul 16 02:29:14 2008
+++ php-src/ext/mbstring/php_mbregex.c  Thu Jul 17 16:08:08 2008
@@ -16,7 +16,7 @@
+---

[PHP-CVS] cvs: php-src(PHP_4_4) /win32 php4dllts.dsp

2008-07-17 Thread Nuno Lopes
nlopess Thu Jul 17 14:42:15 2008 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/win32  php4dllts.dsp 
  Log:
  update for PCRE upgrade
  http://cvs.php.net/viewvc.cgi/php-src/win32/php4dllts.dsp?r1=1.87.2.9.2.5&r2=1.87.2.9.2.6&diff_format=u
Index: php-src/win32/php4dllts.dsp
diff -u php-src/win32/php4dllts.dsp:1.87.2.9.2.5 
php-src/win32/php4dllts.dsp:1.87.2.9.2.6
--- php-src/win32/php4dllts.dsp:1.87.2.9.2.5Tue Feb 13 20:23:28 2007
+++ php-src/win32/php4dllts.dsp Thu Jul 17 14:42:15 2008
@@ -407,400 +407,96 @@
 
 SOURCE=..\ext\pcre\pcrelib\pcre_chartables.c
 
-!IF  "$(CFG)" == "php4dllts - Win32 Debug_TS"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D 
MATCH_LIMIT_RECURSION=1000 /D MAX_NAME_SIZE=32 /D MAX_NAME_COUNT=1 /D 
MAX_DUPLENGTH=3
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D 
MATCH_LIMIT_RECURSION=1000 /D MAX_NAME_SIZE=32 /D MAX_NAME_COUNT=1 /D 
MAX_DUPLENGTH=3
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS_inline"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D 
MATCH_LIMIT_RECURSION=1000 /D MAX_NAME_SIZE=32 /D MAX_NAME_COUNT=1 /D 
MAX_DUPLENGTH=3
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TSDbg"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=..\ext\pcre\pcrelib\pcre_compile.c
 
-!IF  "$(CFG)" == "php4dllts - Win32 Debug_TS"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D 
MATCH_LIMIT_RECURSION=1000 /D MAX_NAME_SIZE=32 /D MAX_NAME_COUNT=1 /D 
MAX_DUPLENGTH=3
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D 
MATCH_LIMIT_RECURSION=1000 /D MAX_NAME_SIZE=32 /D MAX_NAME_COUNT=1 /D 
MAX_DUPLENGTH=3
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS_inline"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D 
MATCH_LIMIT_RECURSION=1000 /D MAX_NAME_SIZE=32 /D MAX_NAME_COUNT=1 /D 
MAX_DUPLENGTH=3
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TSDbg"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=..\ext\pcre\pcrelib\pcre_config.c
 
-!IF  "$(CFG)" == "php4dllts - Win32 Debug_TS"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D 
MATCH_LIMIT_RECURSION=1000 /D MAX_NAME_SIZE=32 /D MAX_NAME_COUNT=1 /D 
MAX_DUPLENGTH=3
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D 
MATCH_LIMIT_RECURSION=1000 /D MAX_NAME_SIZE=32 /D MAX_NAME_COUNT=1 /D 
MAX_DUPLENGTH=3
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS_inline"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D 
MATCH_LIMIT_RECURSION=1000 /D MAX_NAME_SIZE=32 /D MAX_NAME_COUNT=1 /D 
MAX_DUPLENGTH=3
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TSDbg"
-
-!ENDIF 
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\ext\pcre\pcrelib\pcre_newline.c
-
-!IF  "$(CFG)" == "php4dllts - Win32 Debug_TS"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D 
MATCH_LIMIT_RECURSION=1000 /D MAX_NAME_SIZE=32 /D MAX_NAME_COUNT=1 /D 
MAX_DUPLENGTH=3
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D 
MATCH_LIMIT_RECURSION=1000 /D MAX_NAME_SIZE=32 /D MAX_NAME_COUNT=1 /D 
MAX_DUPLENGTH=3
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TS_inline"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH_LIMIT=1000 /D 
MATCH_LIMIT_RECURSION=1000 /D MAX_NAME_SIZE=32 /D MAX_NAME_COUNT=1 /D 
MAX_DUPLENGTH=3
-
-!ELSEIF  "$(CFG)" == "php4dllts - Win32 Release_TSDbg"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
 SOURCE=..\ext\pcre\pcrelib\pcre_exec.c
 
-!IF  "$(CFG)" == "php4dllts - Win32 Debug_TS"
-
-# ADD CPP /D EXPORT= /D NEWLINE=10 /D "SUPPORT_UTF8" /D "SUPPORT_UCP" /D 
LINK_SIZE=2 /D POSIX_MALLOC_THRESHOLD=10 /D MATCH

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

2008-07-17 Thread Nuno Lopes
nlopess Thu Jul 17 14:35:33 2008 UTC

  Modified files:  
/php-src/main   php_compat.h 
  Log:
  update PCRE symbols
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_compat.h?r1=1.34&r2=1.35&diff_format=u
Index: php-src/main/php_compat.h
diff -u php-src/main/php_compat.h:1.34 php-src/main/php_compat.h:1.35
--- php-src/main/php_compat.h:1.34  Mon Dec 31 07:12:18 2007
+++ php-src/main/php_compat.h   Thu Jul 17 14:35:33 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_compat.h,v 1.34 2007/12/31 07:12:18 sebastian Exp $ */
+/* $Id: php_compat.h,v 1.35 2008/07/17 14:35:33 nlopess Exp $ */
 
 #ifndef PHP_COMPAT_H
 #define PHP_COMPAT_H
@@ -56,6 +56,7 @@
 #define _pcre_xclass   php__pcre_xclass
 #define pcre_callout   php_pcre_callout
 #define _pcre_OP_lengths   php__pcre_OP_lengths
+#define _pcre_utt_namesphp__pcre_utt_names
 #define _pcre_default_tables   php__pcre_default_tables
 #define pcre_get_stringtable_entries   php_pcre_get_stringtable_entries
 #define _pcre_is_newline   php__pcre_is_newline



-- 
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_compat.h

2008-07-17 Thread Nuno Lopes
nlopess Thu Jul 17 14:34:51 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   php_compat.h 
  Log:
  update PCRE symbols
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_compat.h?r1=1.25.2.3.2.4.2.1&r2=1.25.2.3.2.4.2.2&diff_format=u
Index: php-src/main/php_compat.h
diff -u php-src/main/php_compat.h:1.25.2.3.2.4.2.1 
php-src/main/php_compat.h:1.25.2.3.2.4.2.2
--- php-src/main/php_compat.h:1.25.2.3.2.4.2.1  Mon Dec 31 07:17:17 2007
+++ php-src/main/php_compat.h   Thu Jul 17 14:34:51 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_compat.h,v 1.25.2.3.2.4.2.1 2007/12/31 07:17:17 sebastian Exp $ */
+/* $Id: php_compat.h,v 1.25.2.3.2.4.2.2 2008/07/17 14:34:51 nlopess Exp $ */
 
 #ifndef PHP_COMPAT_H
 #define PHP_COMPAT_H
@@ -56,8 +56,8 @@
 #define _pcre_xclass   php__pcre_xclass
 #define pcre_callout   php_pcre_callout
 #define _pcre_OP_lengths   php__pcre_OP_lengths
-/* this one doesn't work because pcre.h isn't included from the 
pcre_chartables.c file
-#define _pcre_default_tables   php__pcre_default_tables */
+#define _pcre_utt_namesphp__pcre_utt_names
+#define _pcre_default_tables   php__pcre_default_tables
 #define pcre_get_stringtable_entries   php_pcre_get_stringtable_entries
 #define _pcre_is_newline   php__pcre_is_newline
 #define pcre_stack_freephp_pcre_stack_free



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



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

2008-07-17 Thread Nuno Lopes
nlopess Thu Jul 17 14:33:36 2008 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/main   php_compat.h 
  Log:
  update PCRE symbols
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_compat.h?r1=1.11.4.6.2.4&r2=1.11.4.6.2.5&diff_format=u
Index: php-src/main/php_compat.h
diff -u php-src/main/php_compat.h:1.11.4.6.2.4 
php-src/main/php_compat.h:1.11.4.6.2.5
--- php-src/main/php_compat.h:1.11.4.6.2.4  Sun Feb 25 18:50:16 2007
+++ php-src/main/php_compat.h   Thu Jul 17 14:33:36 2008
@@ -36,8 +36,8 @@
 #define _pcre_xclass   php__pcre_xclass
 #define pcre_callout   php_pcre_callout
 #define _pcre_OP_lengths   php__pcre_OP_lengths
-/* this one doesn't work because pcre.h isn't included from the 
pcre_chartables.c file
-#define _pcre_default_tables   php__pcre_default_tables */
+#define _pcre_utt_namesphp__pcre_utt_names
+#define _pcre_default_tables   php__pcre_default_tables
 #define pcre_get_stringtable_entries   php_pcre_get_stringtable_entries
 #define _pcre_is_newline   php__pcre_is_newline
 #define pcre_stack_freephp_pcre_stack_free



-- 
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 config.w32

2008-07-17 Thread Rui Hirokawa
hirokawaThu Jul 17 14:10:53 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard   config.w32 
  Log:
  fixed win32 build when ext/mbstring is enabled.
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/config.w32?r1=1.4.2.2.2.1.2.2&r2=1.4.2.2.2.1.2.3&diff_format=u
Index: php-src/ext/standard/config.w32
diff -u php-src/ext/standard/config.w32:1.4.2.2.2.1.2.2 
php-src/ext/standard/config.w32:1.4.2.2.2.1.2.3
--- php-src/ext/standard/config.w32:1.4.2.2.2.1.2.2 Thu May 22 22:06:15 2008
+++ php-src/ext/standard/config.w32 Thu Jul 17 14:10:53 2008
@@ -1,5 +1,5 @@
 // vim:ft=javascript
-// $Id: config.w32,v 1.4.2.2.2.1.2.2 2008/05/22 22:06:15 kalle Exp $
+// $Id: config.w32,v 1.4.2.2.2.1.2.3 2008/07/17 14:10:53 hirokawa Exp $
 
 ARG_WITH("config-file-scan-dir", "Dir to check for additional php ini files", 
"");
 
@@ -21,3 +21,6 @@
user_filters.c uuencode.c filters.c proc_open.c \
streamsfuncs.c http.c flock_compat.c", false /* never shared */);
 
+if (PHP_MBREGEX != "no") {
+   CHECK_HEADER_ADD_INCLUDE("oniguruma.h", "CFLAGS_STANDARD", PHP_MBREGEX + 
";ext\\mbstring\\oniguruma")   
+}
\ No newline at end of file



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



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

2008-07-17 Thread Dmitry Stogov
dmitry  Thu Jul 17 14:05:08 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar   phar.c 
  Log:
  Fixed search on uninitialized data
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.33&r2=1.370.2.34&diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.370.2.33 php-src/ext/phar/phar.c:1.370.2.34
--- php-src/ext/phar/phar.c:1.370.2.33  Thu Jul 17 13:22:32 2008
+++ php-src/ext/phar/phar.c Thu Jul 17 14:05:07 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar.c,v 1.370.2.33 2008/07/17 13:22:32 dmitry Exp $ */
+/* $Id: phar.c,v 1.370.2.34 2008/07/17 14:05:07 dmitry Exp $ */
 
 #define PHAR_MAIN 1
 #include "phar_internal.h"
@@ -1427,7 +1427,9 @@
const char *c;
int so_far = 0;
 
-   /* this assumes buf_len > search_len */
+   if (buf_len < search_len) {
+   return NULL;
+   }
c = buf - 1;
do {
if (!(c = memchr(c + 1, search[0], buf_len - search_len - 
so_far))) {
@@ -1579,7 +1581,7 @@
}
}
}
-   if ((pos = phar_strnstr(buffer, 1024 + sizeof(token), token, 
sizeof(token)-1)) != NULL) {
+   if (got > 0 && (pos = phar_strnstr(buffer, got + sizeof(token), 
token, sizeof(token)-1)) != NULL) {
halt_offset += (pos - buffer); /* no -tokenlen+tokenlen 
here */
return phar_parse_pharfile(fp, fname, fname_len, alias, 
alias_len, halt_offset, pphar, compression, error TSRMLS_CC);
}
@@ -3412,7 +3414,7 @@
php_info_print_table_header(2, "Phar: PHP Archive support", "enabled");
php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION);
php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION);
-   php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.33 $");
+   php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.34 $");
php_info_print_table_row(2, "Phar-based phar archives", "enabled");
php_info_print_table_row(2, "Tar-based phar archives", "enabled");
php_info_print_table_row(2, "ZIP-based phar archives", "enabled");



-- 
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/phar phar.c zip.c

2008-07-17 Thread Dmitry Stogov
dmitry  Thu Jul 17 13:22:33 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/phar   phar.c zip.c 
  Log:
  Fixed wrong arguments order
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/phar.c?r1=1.370.2.32&r2=1.370.2.33&diff_format=u
Index: php-src/ext/phar/phar.c
diff -u php-src/ext/phar/phar.c:1.370.2.32 php-src/ext/phar/phar.c:1.370.2.33
--- php-src/ext/phar/phar.c:1.370.2.32  Thu Jul 10 11:36:50 2008
+++ php-src/ext/phar/phar.c Thu Jul 17 13:22:32 2008
@@ -17,7 +17,7 @@
   +--+
 */
 
-/* $Id: phar.c,v 1.370.2.32 2008/07/10 11:36:50 dmitry Exp $ */
+/* $Id: phar.c,v 1.370.2.33 2008/07/17 13:22:32 dmitry Exp $ */
 
 #define PHAR_MAIN 1
 #include "phar_internal.h"
@@ -963,7 +963,7 @@
MAPPHAR_FAIL("internal corruption of phar \"%s\" (too many 
manifest entries for size of manifest)")
}
 
-   mydata = pecalloc(sizeof(phar_archive_data), 1, PHAR_G(persist));
+   mydata = pecalloc(1, sizeof(phar_archive_data), PHAR_G(persist));
mydata->is_persistent = PHAR_G(persist);
 
/* check whether we have meta data, zero check works regardless of byte 
order */
@@ -1281,7 +1281,7 @@
}
 
/* set up our manifest */
-   mydata = ecalloc(sizeof(phar_archive_data), 1);
+   mydata = ecalloc(1, sizeof(phar_archive_data));
 
mydata->fname = expand_filepath(fname, NULL TSRMLS_CC);
fname_len = strlen(mydata->fname);
@@ -3412,7 +3412,7 @@
php_info_print_table_header(2, "Phar: PHP Archive support", "enabled");
php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION);
php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION);
-   php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.32 $");
+   php_info_print_table_row(2, "CVS revision", "$Revision: 1.370.2.33 $");
php_info_print_table_row(2, "Phar-based phar archives", "enabled");
php_info_print_table_row(2, "Tar-based phar archives", "enabled");
php_info_print_table_row(2, "ZIP-based phar archives", "enabled");
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/zip.c?r1=1.47.2.13&r2=1.47.2.14&diff_format=u
Index: php-src/ext/phar/zip.c
diff -u php-src/ext/phar/zip.c:1.47.2.13 php-src/ext/phar/zip.c:1.47.2.14
--- php-src/ext/phar/zip.c:1.47.2.13Sat Jun 21 20:14:43 2008
+++ php-src/ext/phar/zip.c  Thu Jul 17 13:22:32 2008
@@ -193,7 +193,7 @@
php_stream_close(fp);
return FAILURE;
}
-   mydata = pecalloc(sizeof(phar_archive_data), 1, 
PHAR_G(persist));
+   mydata = pecalloc(1, sizeof(phar_archive_data), 
PHAR_G(persist));
mydata->is_persistent = PHAR_G(persist);
 
/* read in archive comment, if any */



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



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

2008-07-17 Thread Antony Dovgal
tony2001Thu Jul 17 11:40:55 2008 UTC

  Modified files:  
/php-src/ext/xmlxml.c 
  Log:
  fix folding
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xml/xml.c?r1=1.179&r2=1.180&diff_format=u
Index: php-src/ext/xml/xml.c
diff -u php-src/ext/xml/xml.c:1.179 php-src/ext/xml/xml.c:1.180
--- php-src/ext/xml/xml.c:1.179 Thu Jul 17 09:52:51 2008
+++ php-src/ext/xml/xml.c   Thu Jul 17 11:40:55 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: xml.c,v 1.179 2008/07/17 09:52:51 dmitry Exp $ */
+/* $Id: xml.c,v 1.180 2008/07/17 11:40:55 tony2001 Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -1261,7 +1261,7 @@
 
 /* EXTENSION FUNCTIONS */
 
-static void php_xml_parser_create_impl(INTERNAL_FUNCTION_PARAMETERS, int 
ns_support)
+static void php_xml_parser_create_impl(INTERNAL_FUNCTION_PARAMETERS, int 
ns_support) /* {{{ */
 {
xml_parser *parser;
int auto_detect = 0;
@@ -1317,6 +1317,7 @@
ZEND_REGISTER_RESOURCE(return_value, parser,le_xml_parser);
parser->index = Z_LVAL_P(return_value);
 }
+/* }}} */
 
 /* {{{ proto resource xml_parser_create([string encoding]) 
Create an XML parser */



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

2008-07-17 Thread Antony Dovgal
tony2001Thu Jul 17 10:24:52 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/xmlxml.c 
  Log:
  fix folding
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xml/xml.c?r1=1.157.2.4.2.5.2.9&r2=1.157.2.4.2.5.2.10&diff_format=u
Index: php-src/ext/xml/xml.c
diff -u php-src/ext/xml/xml.c:1.157.2.4.2.5.2.9 
php-src/ext/xml/xml.c:1.157.2.4.2.5.2.10
--- php-src/ext/xml/xml.c:1.157.2.4.2.5.2.9 Thu Jul 17 09:53:42 2008
+++ php-src/ext/xml/xml.c   Thu Jul 17 10:24:51 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: xml.c,v 1.157.2.4.2.5.2.9 2008/07/17 09:53:42 dmitry Exp $ */
+/* $Id: xml.c,v 1.157.2.4.2.5.2.10 2008/07/17 10:24:51 tony2001 Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -1196,7 +1196,7 @@
 
 /* EXTENSION FUNCTIONS */
 
-static void php_xml_parser_create_impl(INTERNAL_FUNCTION_PARAMETERS, int 
ns_support)
+static void php_xml_parser_create_impl(INTERNAL_FUNCTION_PARAMETERS, int 
ns_support) /* {{{ */
 {
xml_parser *parser;
int auto_detect = 0;
@@ -1252,6 +1252,7 @@
ZEND_REGISTER_RESOURCE(return_value, parser,le_xml_parser);
parser->index = Z_LVAL_P(return_value);
 }
+/* }}} */
 
 /* {{{ proto resource xml_parser_create([string encoding]) 
Create an XML parser */



-- 
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/curl/tests curl_006.phpt /ext/filter/tests callback_closure.phpt /ext/mysqli mysqli_api.c /ext/mysqli/tests mysqli_set_local_infile_handler_closures.phpt /ext/

2008-07-17 Thread Dmitry Stogov
dmitry  Thu Jul 17 09:53:42 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/curl/tests curl_006.phpt 
/php-src/ext/filter/tests   callback_closure.phpt 
/php-src/ext/mysqli/tests   
mysqli_set_local_infile_handler_closures.phpt 
/php-src/ext/pcntl/testssignal_closure_handler.phpt 
/php-src/ext/session/tests  save_handler_closures.inc 
session_set_save_handler_closures.phpt 
/php-src/ext/sqlite/tests   sqlite_closures_001.phpt 
sqlite_closures_002.phpt 
/php-src/ext/standard/tests/assert  assert_closures.phpt 
/php-src/ext/standard/tests/general_functions   closures_001.phpt 
closures_002.phpt 
ob_start_closures.phpt 
/php-src/ext/xml/tests  xml_closures_001.phpt 

  Modified files:  
/php-src/ext/mysqli mysqli_api.c 
/php-src/ext/standard   basic_functions.c 
/php-src/ext/xmlxml.c 
/php-src/main   output.c 
  Log:
  Support for closures
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.22.2.16.2.17&r2=1.118.2.22.2.16.2.18&diff_format=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16.2.17 
php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16.2.18
--- php-src/ext/mysqli/mysqli_api.c:1.118.2.22.2.16.2.17Thu Apr 24 
14:22:19 2008
+++ php-src/ext/mysqli/mysqli_api.c Thu Jul 17 09:53:41 2008
@@ -17,7 +17,7 @@
   |  Ulf Wendel <[EMAIL PROTECTED]>
 |
   +--+
 
-  $Id: mysqli_api.c,v 1.118.2.22.2.16.2.17 2008/04/24 14:22:19 andrey Exp $ 
+  $Id: mysqli_api.c,v 1.118.2.22.2.16.2.18 2008/07/17 09:53:41 dmitry Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1420,6 +1420,7 @@
efree(callback_name);
RETURN_FALSE;
}
+   efree(callback_name);
 
/* save callback function */
if (!mysql->li_read) {
@@ -1427,7 +1428,7 @@
} else {
zval_dtor(mysql->li_read);
}
-   ZVAL_STRING(mysql->li_read, callback_name, 0);
+   ZVAL_ZVAL(mysql->li_read, callback_func, 1, 0);
 
RETURN_TRUE;
 }
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.35&r2=1.725.2.31.2.64.2.36&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.35 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.36
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.35 Sun May 25 
14:06:13 2008
+++ php-src/ext/standard/basic_functions.c  Thu Jul 17 09:53:42 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.35 2008/05/25 14:06:13 bjori Exp 
$ */
+/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.36 2008/07/17 09:53:42 dmitry 
Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -5392,6 +5392,10 @@
zval result;
zend_compare_arrays(&result, func1, func2 TSRMLS_CC);
ret = (Z_LVAL(result) == 0);
+   } else if (Z_TYPE_P(func1) == IS_OBJECT && Z_TYPE_P(func2) == 
IS_OBJECT) {
+   zval result;
+   zend_compare_objects(&result, func1, func2 TSRMLS_CC);
+   ret = (Z_LVAL(result) == 0);
} else {
ret = 0;
}
@@ -6044,7 +6048,7 @@
efree(function_name);
}
 
-   if (Z_TYPE_P(tick_fe.arguments[0]) != IS_ARRAY) {
+   if (Z_TYPE_P(tick_fe.arguments[0]) != IS_ARRAY && 
Z_TYPE_P(tick_fe.arguments[0]) != IS_OBJECT) {
convert_to_string_ex(&tick_fe.arguments[0]);
}
 
http://cvs.php.net/viewvc.cgi/php-src/ext/xml/xml.c?r1=1.157.2.4.2.5.2.8&r2=1.157.2.4.2.5.2.9&diff_format=u
Index: php-src/ext/xml/xml.c
diff -u php-src/ext/xml/xml.c:1.157.2.4.2.5.2.8 
php-src/ext/xml/xml.c:1.157.2.4.2.5.2.9
--- php-src/ext/xml/xml.c:1.157.2.4.2.5.2.8 Sat Jul  5 20:17:58 2008
+++ php-src/ext/xml/xml.c   Thu Jul 17 09:53:42 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: xml.c,v 1.157.2.4.2.5.2.8 2008/07/05 20:17:58 felipe Exp $ */
+/* $Id: xml.c,v 1.157.2.4.2.5.2.9 2008/07/17 09:53:42 dmitry Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -508,7 +508,7 @@
}
 
/* IS_ARRAY might indicate that we're using array($obj, 'method') 
syntax */
-   if (Z_TYPE_PP(data) != IS_ARRAY) {
+   if (Z_TYPE_PP(data) != IS_ARRAY && Z_TYPE_PP(data) != IS_OBJECT) {
 
convert_to_string_ex(data);
if (Z_STRLEN_PP(data) == 0) {
http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.4.2.5&r2=1.167.2.3.

[PHP-CVS] cvs: php-src /ext/curl/tests curl_006.phpt /ext/filter/tests callback_closure.phpt /ext/mysqli mysqli_api.c /ext/mysqli/tests mysqli_set_local_infile_handler_closures.phpt /ext/pcntl/tes

2008-07-17 Thread Dmitry Stogov
dmitry  Thu Jul 17 09:52:51 2008 UTC

  Added files: 
/php-src/ext/curl/tests curl_006.phpt 
/php-src/ext/filter/tests   callback_closure.phpt 
/php-src/ext/mysqli/tests   
mysqli_set_local_infile_handler_closures.phpt 
/php-src/ext/pcntl/testssignal_closure_handler.phpt 
/php-src/ext/session/tests  save_handler_closures.inc 
session_set_save_handler_closures.phpt 
/php-src/ext/sqlite/tests   sqlite_closures_001.phpt 
sqlite_closures_002.phpt 
/php-src/ext/standard/tests/assert  assert_closures.phpt 
/php-src/ext/standard/tests/general_functions   closures_001.phpt 
closures_002.phpt 
ob_start_closures.phpt 
/php-src/ext/xml/tests  xml_closures_001.phpt 

  Modified files:  
/php-src/ext/mysqli mysqli_api.c 
/php-src/ext/standard   basic_functions.c 
/php-src/ext/xmlxml.c 
  Log:
  support for closures
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_api.c?r1=1.165&r2=1.166&diff_format=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.165 
php-src/ext/mysqli/mysqli_api.c:1.166
--- php-src/ext/mysqli/mysqli_api.c:1.165   Thu Apr 24 14:04:58 2008
+++ php-src/ext/mysqli/mysqli_api.c Thu Jul 17 09:52:51 2008
@@ -17,7 +17,7 @@
   |  Ulf Wendel <[EMAIL PROTECTED]>
 |
   +--+
 
-  $Id: mysqli_api.c,v 1.165 2008/04/24 14:04:58 andrey Exp $ 
+  $Id: mysqli_api.c,v 1.166 2008/07/17 09:52:51 dmitry Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -1457,7 +1457,7 @@
 {
MY_MYSQL*mysql;
zval*mysql_link;
-   zvalcallback_name, *p_callback_name;
+   zvalcallback_name;
zval*callback_func;
 
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
"Oz", &mysql_link, mysqli_link_class_entry,
@@ -1467,7 +1467,7 @@
 
MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", 
MYSQLI_STATUS_VALID);
 
-   if (UG(unicode)) {
+   if (UG(unicode) && Z_TYPE_P(callback_func) != IS_ARRAY && 
Z_TYPE_P(callback_func) != IS_OBJECT) {
convert_to_string(callback_func);
}
 
@@ -1477,6 +1477,7 @@
zval_dtor(&callback_name);
RETURN_FALSE;
}
+   zval_dtor(&callback_name);
 
/* save callback function */
if (!mysql->li_read) {
@@ -1484,8 +1485,7 @@
} else {
zval_dtor(mysql->li_read);
}
-   p_callback_name = &callback_name;
-   ZVAL_ZVAL(mysql->li_read, p_callback_name, 0, 0);
+   ZVAL_ZVAL(mysql->li_read, callback_func, 1, 0);
 
RETURN_TRUE;
 }
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.900&r2=1.901&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.900 
php-src/ext/standard/basic_functions.c:1.901
--- php-src/ext/standard/basic_functions.c:1.900Sat May 24 14:36:16 2008
+++ php-src/ext/standard/basic_functions.c  Thu Jul 17 09:52:51 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.900 2008/05/24 14:36:16 pajoye Exp $ */
+/* $Id: basic_functions.c,v 1.901 2008/07/17 09:52:51 dmitry Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -5390,6 +5390,10 @@
zval result;
zend_compare_arrays(&result, func1, func2 TSRMLS_CC);
ret = (Z_LVAL(result) == 0);
+   } else if (Z_TYPE_P(func1) == IS_OBJECT && Z_TYPE_P(func2) == 
IS_OBJECT) {
+   zval result;
+   zend_compare_objects(&result, func1, func2 TSRMLS_CC);
+   ret = (Z_LVAL(result) == 0);
} else {
ret = 0;
}
@@ -6109,7 +6113,7 @@
RETURN_FALSE;
}
 
-   if (Z_TYPE_P(tick_fe.arguments[0]) != IS_ARRAY) {
+   if (Z_TYPE_P(tick_fe.arguments[0]) != IS_ARRAY && 
Z_TYPE_P(tick_fe.arguments[0]) != IS_OBJECT) {
convert_to_text_ex(&tick_fe.arguments[0]);
}
 
http://cvs.php.net/viewvc.cgi/php-src/ext/xml/xml.c?r1=1.178&r2=1.179&diff_format=u
Index: php-src/ext/xml/xml.c
diff -u php-src/ext/xml/xml.c:1.178 php-src/ext/xml/xml.c:1.179
--- php-src/ext/xml/xml.c:1.178 Sat Jul  5 20:19:47 2008
+++ php-src/ext/xml/xml.c   Thu Jul 17 09:52:51 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: xml.c,v 1.178 2008/07/05 20:19:47 felipe Exp $ */
+/* $Id: xml.c,v 1.179 2008/07/17 09:52:51 dmitry Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -515,7 +515,7 @@
}