[PHP-CVS] cvs: php4 /ext/gd config.m4
moriyoshi Mon Jun 9 04:11:53 2003 EDT Modified files: /php4/ext/gdconfig.m4 Log: Fixed trivial typo Index: php4/ext/gd/config.m4 diff -u php4/ext/gd/config.m4:1.136 php4/ext/gd/config.m4:1.137 --- php4/ext/gd/config.m4:1.136 Mon Apr 21 15:07:21 2003 +++ php4/ext/gd/config.m4 Mon Jun 9 04:11:53 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.136 2003/04/21 19:07:21 moriyoshi Exp $ +dnl $Id: config.m4,v 1.137 2003/06/09 08:11:53 moriyoshi Exp $ dnl dnl @@ -41,7 +41,7 @@ [ --enable-gd-native-ttfGD: Enable TrueType string function.], no, no) PHP_ARG_ENABLE(gd-jis-conv, whether to enable JIS-mapped Japanese font support in GD, -[ --enable-gd-jis-conv GD: Enable JIS-mapped Japanese font suppert.], no, no) +[ --enable-gd-jis-conv GD: Enable JIS-mapped Japanese font support.], no, no) dnl dnl Checks for the configure options -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/gd config.m4
moriyoshi Mon Jun 9 04:12:03 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/gdconfig.m4 Log: MFH(r-1.137): fixed trivial typo Index: php4/ext/gd/config.m4 diff -u php4/ext/gd/config.m4:1.120.2.14 php4/ext/gd/config.m4:1.120.2.15 --- php4/ext/gd/config.m4:1.120.2.14Mon Apr 21 15:07:50 2003 +++ php4/ext/gd/config.m4 Mon Jun 9 04:12:03 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.120.2.14 2003/04/21 19:07:50 moriyoshi Exp $ +dnl $Id: config.m4,v 1.120.2.15 2003/06/09 08:12:03 moriyoshi Exp $ dnl dnl @@ -41,7 +41,7 @@ [ --enable-gd-native-ttfGD: Enable TrueType string function.], no, no) PHP_ARG_ENABLE(gd-jis-conv, whether to enable JIS-mapped Japanese font support in GD, -[ --enable-gd-jis-conv GD: Enable JIS-mapped Japanese font suppert.], no, no) +[ --enable-gd-jis-conv GD: Enable JIS-mapped Japanese font support.], no, no) dnl dnl Checks for the configure options -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: spl / spl_foreach.c
helly Mon Jun 9 12:57:17 2003 EDT Modified files: /splspl_foreach.c Log: Add some 'structure' and make it faster Index: spl/spl_foreach.c diff -u spl/spl_foreach.c:1.9 spl/spl_foreach.c:1.10 --- spl/spl_foreach.c:1.9 Sat May 31 11:22:42 2003 +++ spl/spl_foreach.c Mon Jun 9 12:57:17 2003 @@ -37,22 +37,27 @@ memset(emalloc(size), 0, size) typedef struct { - zval *obj; - zend_class_entry *obj_ce; - zend_uintindex; - spl_is_a is_a; - zend_function*f_next; - zend_function*f_rewind; - zend_function*f_more; - zend_function*f_current; - zend_function*f_key; + zend_function *next; + zend_function *rewind; + zend_function *more; + zend_function *current; + zend_function *key; +} spl_foreach_funcs; + +typedef struct { + zval *obj; + zend_class_entry *obj_ce; + zend_uint index; + spl_is_a is_a; + spl_foreach_funcs funcs; + char dummy; /* needed for '\0' but we can't set it due to compiler optimizations */ } spl_foreach_proxy; /* {{{ ZEND_EXECUTE_HOOK_FUNCTION(ZEND_FE_RESET) */ ZEND_EXECUTE_HOOK_FUNCTION(ZEND_FE_RESET) { zval **obj, *retval; - spl_foreach_proxy proxy; + spl_foreach_proxy *proxy; zend_class_entry *instance_ce; spl_is_a is_a; @@ -83,15 +88,18 @@ } /* create the proxy */ - memset(proxy, 0, sizeof(spl_foreach_proxy)); - proxy.obj = retval; - proxy.obj_ce = instance_ce; - proxy.is_a = is_a; + proxy = emalloc(sizeof(spl_foreach_proxy)); + proxy-obj = retval; + proxy-obj_ce = instance_ce; + proxy-index = 0; + proxy-is_a = is_a; + memset(proxy-funcs, 0, sizeof(spl_foreach_funcs)); + ((char*)proxy)[sizeof(spl_foreach_proxy)-1] = '\0'; /* And pack it into a zval. Since it is nowhere accessible using a * zval of type STRING is the fastest approach of storing the proxy. */ ALLOC_INIT_ZVAL(retval); - ZVAL_STRINGL(retval, (char*)proxy, sizeof(spl_foreach_proxy), 1); + ZVAL_STRINGL(retval, (char*)proxy, sizeof(spl_foreach_proxy)-1, 0); retval-refcount += 2; /* lock two times */ /* return the created proxy container */ EX_T(EX(opline)-result.u.var).var.ptr = retval; @@ -139,22 +147,22 @@ obj = proxy-obj; /* will be optimized out */ if (proxy-index++) { - spl_begin_method_call_this(obj, proxy-obj_ce, proxy-f_next, next, sizeof(next)-1, tmp TSRMLS_CC); + spl_begin_method_call_this(obj, proxy-obj_ce, proxy-funcs.next, next, sizeof(next)-1, tmp TSRMLS_CC); } else { if (proxy-is_a SPL_IS_A_SEQUENCE) { - spl_begin_method_call_this(obj, proxy-obj_ce, proxy-f_rewind, rewind, sizeof(rewind)-1, tmp TSRMLS_CC); + spl_begin_method_call_this(obj, proxy-obj_ce, proxy-funcs.rewind, rewind, sizeof(rewind)-1, tmp TSRMLS_CC); } op_array-opcodes[EX(opline)-op2.u.opline_num].op2 = *op1; } - spl_begin_method_call_this(obj, proxy-obj_ce, proxy-f_more, has_more, sizeof(has_more)-1, more TSRMLS_CC); + spl_begin_method_call_this(obj, proxy-obj_ce, proxy-funcs.more, has_more, sizeof(has_more)-1, more TSRMLS_CC); if (zend_is_true(more)) { result = EX_T(EX(opline)-result.u.var).tmp_var; - spl_begin_method_call_ex(obj, proxy-obj_ce, proxy-f_current, current, sizeof(current)-1, value TSRMLS_CC); + spl_begin_method_call_ex(obj, proxy-obj_ce, proxy-funcs.current, current, sizeof(current)-1, value TSRMLS_CC); if (proxy-is_a SPL_IS_A_ASSOC) { - spl_begin_method_call_ex(obj, proxy-obj_ce, proxy-f_key, key, sizeof(key)-1, key TSRMLS_CC); + spl_begin_method_call_ex(obj, proxy-obj_ce, proxy-funcs.key, key, sizeof(key)-1, key TSRMLS_CC); } else { MAKE_STD_ZVAL(key); key-value.lval = proxy-index; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: spl / spl.php spl_array.c spl_foreach.c
helly Mon Jun 9 12:58:51 2003 EDT Modified files: /splspl.php spl_array.c spl_foreach.c Log: No more namespaces Index: spl/spl.php diff -u spl/spl.php:1.1.1.1 spl/spl.php:1.2 --- spl/spl.php:1.1.1.1 Thu May 1 19:28:28 2003 +++ spl/spl.php Mon Jun 9 12:58:51 2003 @@ -1,306 +1,304 @@ ?php -/* \brief Standard PHP Library +/* Standard PHP Library * * (c) M.Boerger 2003 */ -namespace spl { - /*! \brief Interface to foreach() construct -* -* Any class that implements this interface can for example be used as -* the input parameter to foreach() calls which would normally be an -* array. +/*! \brief Interface to foreach() construct + * + * Any class that implements this interface can for example be used as + * the input parameter to foreach() calls which would normally be an + * array. + * + * The only thing a class has to do is + */ +interface iterator { + + /*! \brief Create a new iterator * -* The only thing a class has to do is +* used for example in foreach() operator. */ - interface iterator { - - /*! \brief Create a new iterator -* -* used for example in foreach() operator. -*/ - function new_iterator(); + function new_iterator(); +} + +/*! \brief Simple forward iterator + * + * Any class that implements this interface can be used as the + * return of a foreach interface. And hence the class itself + * can be used as a parameter to be iterated (normally an array). + * + * \code + class c implements spl::foreach, spl::forward { + private $num = 0; + function new_iterator() { + $this-num = 0; + return $this; + } + function current() { + return $this-num; + } + function next() { + $this-num++; + } + function has_more() { + return $this-num 5; + } } + + $t = new c(); - /*! \brief Simple forward iterator -* -* Any class that implements this interface can be used as the -* return of a foreach interface. And hence the class itself -* can be used as a parameter to be iterated (normally an array). -* -* \code - class c implements spl::foreach, spl::forward { - private $num = 0; - function new_iterator() { - $this-num = 0; - return $this; - } - function current() { - return $this-num; - } - function next() { - $this-num++; - } - function has_more() { - return $this-num 5; - } + foreach($t as $num) { + echo $num\n; + } + \endcode + * + * A very interesting usage scenario are for example database queries. + * Without this interface you need to do it without foreach or fetch the + * whole rowset into an array. + * + * In the above code the class implements both the foreach and the + * forward interface. Doing this you cannot have nested foreach calls. + * If you need this you must split the two parts. + * + * \code + class c implements spl::foreach { + public $max = 3; + function new_iterator() { + return new c_iter($this); } - - $t = new c(); + } + class c_iter implements spl::forward { + private $obj; + private $num = 0; + function __construct($obj) { + $this-obj = $obj; + } + function current() { + return $this-num; + } + function next() { + $this-num++; + } + function has_more() { + return $this-num $this-obj-max; + } + } + + $t = new c(); - foreach($t as $num) { - echo $num\n; + foreach($t as $outer) { + foreach($t as $inner) { + echo $outer,$inner\n; } - \endcode -* -* A very interesting usage scenario are for example database queries. -* Without this interface you need to do it without foreach or fetch the -* whole rowset into an array. -* -* In the above code the class implements both the foreach and the -* forward interface. Doing this you cannot have nested foreach
[PHP-CVS] cvs: php4(PHP_4_3) / NEWS
wez Mon Jun 9 13:04:58 2003 EDT Modified files: (Branch: PHP_4_3) /php4 NEWS Log: BFN Index: php4/NEWS diff -u php4/NEWS:1.1247.2.248 php4/NEWS:1.1247.2.249 --- php4/NEWS:1.1247.2.248 Sun Jun 8 20:25:26 2003 +++ php4/NEWS Mon Jun 9 13:04:57 2003 @@ -26,6 +26,8 @@ - Fixed ext/exif to honor magic_quotes_runtime php.ini option. (Marcus) - Fixed bug #24060 (ncurses_del_panel() causes segfault). (Georg) - Fixed bug #24054 (Integer overflow failure with GCC/x86 for *=). (Sascha) +- Fixed bug #23951 (constants in static initializers clobbered by inheritance). + (Wez, Zend Engine) - Fixed bug #23913 (make rename() work across partitions on *nix). (Ilia) - Fixed bug #23912 (Invalid CSS in phpinfo() output). (Ilia) - Fixed bug #23902 (NULL in CGI header output). (Shane) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / NEWS /ext/standard string.c /ext/standard/tests/strings bug24098.phpt
iliaa Mon Jun 9 14:12:36 2003 EDT Added files: /php4/ext/standard/tests/stringsbug24098.phpt Modified files: /php4 NEWS /php4/ext/standard string.c Log: Fixed bug #24098 (Crash in pathinfo() due to double var initialization). # This is a php5 specific bug, no MFB needed Index: php4/NEWS diff -u php4/NEWS:1.1420 php4/NEWS:1.1421 --- php4/NEWS:1.1420Fri May 30 17:19:56 2003 +++ php4/NEWS Mon Jun 9 14:12:36 2003 @@ -100,6 +100,7 @@ - Fixed is_executable() to be available also on Windows. (Shane) - Fixed dirname() and strip_tags() to be binary-safe. (Moriyoshi) +- Fixed bug #24098 (crash in pathinfo()). (Ilia) - Fixed bug #21985 and #22064 (various mb_send_mail() issues). (Moriyoshi) - Fixed bug #21600 (Assign by reference function call changes variable contents). (Zeev) Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.387 php4/ext/standard/string.c:1.388 --- php4/ext/standard/string.c:1.387Mon May 26 20:42:39 2003 +++ php4/ext/standard/string.c Mon Jun 9 14:12:36 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.387 2003/05/27 00:42:39 msopacua Exp $ */ +/* $Id: string.c,v 1.388 2003/06/09 18:12:36 iliaa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1268,7 +1268,6 @@ if ((opt PHP_PATHINFO_EXTENSION) == PHP_PATHINFO_EXTENSION) { char *p; int idx; - int ret_len; int have_basename = ((opt PHP_PATHINFO_BASENAME) == PHP_PATHINFO_BASENAME); /* Have we alrady looked up the basename? */ Index: php4/ext/standard/tests/strings/bug24098.phpt +++ php4/ext/standard/tests/strings/bug24098.phpt --TEST-- Bug #24098 (pathinfo() crash) --FILE-- ?php var_dump(pathinfo(/dsds.asa)); ? --EXPECT-- array(3) { [dirname]= string(1) / [basename]= string(8) dsds.asa [extension]= string(3) asa } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/dom attr.c cdatasection.c characterdata.c comment.c document.c documentfragment.c documenttype.c domimplementation.c element.c entityreference.c node.c php_dom.c php_dom.h processinginstruction.c text.c xml_common.h
rrichards Mon Jun 9 16:20:55 2003 EDT Modified files: /php4/ext/dom attr.c cdatasection.c characterdata.c comment.c document.c documentfragment.c documenttype.c domimplementation.c element.c entityreference.c node.c php_dom.c php_dom.h processinginstruction.c text.c xml_common.h Log: implmentation of document ref counting for persistance re-work of internal object handling Index: php4/ext/dom/attr.c diff -u php4/ext/dom/attr.c:1.1 php4/ext/dom/attr.c:1.2 --- php4/ext/dom/attr.c:1.1 Thu Jun 5 13:06:52 2003 +++ php4/ext/dom/attr.c Mon Jun 9 16:20:55 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: attr.c,v 1.1 2003/06/05 17:06:52 rrichards Exp $ */ +/* $Id: attr.c,v 1.2 2003/06/09 20:20:55 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -52,7 +52,8 @@ int name_len, value_len; id = getThis(); - + intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC); + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s|s, name, name_len, value, value_len) == FAILURE) { return; } @@ -67,13 +68,12 @@ if (!nodep) RETURN_FALSE; - intern = (dom_object *)zend_object_store_get_object(id TSRMLS_CC); if (intern != NULL) { oldnode = (xmlNodePtr)intern-ptr; if (oldnode != NULL) { node_free_resource(oldnode TSRMLS_CC); } - php_dom_set_object(id, (xmlNodePtr) nodep TSRMLS_CC); + php_dom_set_object(intern, (xmlNodePtr) nodep TSRMLS_CC); } } @@ -169,8 +169,6 @@ */ int dom_attr_owner_element_read(dom_object *obj, zval **retval TSRMLS_DC) { - - zval *wrapper; xmlNodePtr nodep, nodeparent; int ret; @@ -181,11 +179,9 @@ return FAILURE; } - wrapper = dom_object_get_data(nodeparent); - if (wrapper == NULL) { - ALLOC_ZVAL(*retval); - } - if (NULL == (*retval = php_dom_create_object(nodeparent, ret, wrapper, *retval TSRMLS_CC))) { + ALLOC_ZVAL(*retval); + + if (NULL == (*retval = php_dom_create_object(nodeparent, ret, NULL, *retval, obj TSRMLS_CC))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot create required DOM object); return FAILURE; } Index: php4/ext/dom/cdatasection.c diff -u php4/ext/dom/cdatasection.c:1.1 php4/ext/dom/cdatasection.c:1.2 --- php4/ext/dom/cdatasection.c:1.1 Thu Jun 5 13:06:52 2003 +++ php4/ext/dom/cdatasection.c Mon Jun 9 16:20:55 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: cdatasection.c,v 1.1 2003/06/05 17:06:52 rrichards Exp $ */ +/* $Id: cdatasection.c,v 1.2 2003/06/09 20:20:55 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -67,7 +67,7 @@ if (oldnode != NULL) { node_free_resource(oldnode TSRMLS_CC); } - php_dom_set_object(id, nodep TSRMLS_CC); + php_dom_set_object(intern, nodep TSRMLS_CC); } } /* }}} end dom_cdatasection_cdatasection */ Index: php4/ext/dom/characterdata.c diff -u php4/ext/dom/characterdata.c:1.1 php4/ext/dom/characterdata.c:1.2 --- php4/ext/dom/characterdata.c:1.1Thu Jun 5 13:06:52 2003 +++ php4/ext/dom/characterdata.cMon Jun 9 16:20:55 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: characterdata.c,v 1.1 2003/06/05 17:06:52 rrichards Exp $ */ +/* $Id: characterdata.c,v 1.2 2003/06/09 20:20:55 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -140,11 +140,12 @@ { zval *id; xmlNode *nodep; + dom_object *intern; char *arg; int arg_len; - DOM_GET_THIS_OBJ(nodep, id, xmlNodePtr); + DOM_GET_THIS_OBJ(nodep, id, xmlNodePtr, intern); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, arg, arg_len) == FAILURE) { return; Index: php4/ext/dom/comment.c diff -u php4/ext/dom/comment.c:1.1 php4/ext/dom/comment.c:1.2 --- php4/ext/dom/comment.c:1.1 Thu Jun 5 13:06:52 2003 +++ php4/ext/dom/comment.c Mon Jun 9 16:20:55 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: comment.c,v 1.1 2003/06/05 17:06:52 rrichards Exp $ */ +/* $Id: comment.c,v 1.2 2003/06/09 20:20:55 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -66,7 +66,7 @@ if (oldnode != NULL) { node_free_resource(oldnode TSRMLS_CC); } - php_dom_set_object(id, nodep TSRMLS_CC); + php_dom_set_object(intern, nodep
[PHP-CVS] cvs: php4 /ext/session session.c
sas Mon Jun 9 23:56:24 2003 EDT Modified files: /php4/ext/session session.c Log: Print NOTICE upon session_start being called while another session is active Index: php4/ext/session/session.c diff -u php4/ext/session/session.c:1.364 php4/ext/session/session.c:1.365 --- php4/ext/session/session.c:1.364Fri May 30 22:33:55 2003 +++ php4/ext/session/session.c Mon Jun 9 23:56:23 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.364 2003/05/31 02:33:55 sniper Exp $ */ +/* $Id: session.c,v 1.365 2003/06/10 03:56:23 sas Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1061,8 +1061,10 @@ PS(define_sid) = 1; PS(send_cookie) = 1; - if (PS(session_status) != php_session_none) + if (PS(session_status) != php_session_none) { + php_error(E_NOTICE, A session had already been started - ignoring session_start()); return; + } lensess = strlen(PS(session_name)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/session session.c
sas Mon Jun 9 23:57:16 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/session session.c Log: MFH E_NOTICE Index: php4/ext/session/session.c diff -u php4/ext/session/session.c:1.336.2.17 php4/ext/session/session.c:1.336.2.18 --- php4/ext/session/session.c:1.336.2.17 Thu May 29 13:39:00 2003 +++ php4/ext/session/session.c Mon Jun 9 23:57:16 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.336.2.17 2003/05/29 17:39:00 sas Exp $ */ +/* $Id: session.c,v 1.336.2.18 2003/06/10 03:57:16 sas Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -962,8 +962,10 @@ PS(define_sid) = 1; PS(send_cookie) = 1; - if (PS(session_status) != php_session_none) + if (PS(session_status) != php_session_none) { + php_error(E_NOTICE, A session had already been started - ignoring session_start()); return; + } lensess = strlen(PS(session_name)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php