[PHP-CVS] cvs: CVSROOT / avail

2004-03-09 Thread Rasmus Lerdorf
rasmus  Wed Mar 10 00:35:10 2004 EDT

  Modified files:  
/CVSROOTavail 
  Log:
  doc karma for amt
  
  
http://cvs.php.net/diff.php/CVSROOT/avail?r1=1.833&r2=1.834&ty=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.833 CVSROOT/avail:1.834
--- CVSROOT/avail:1.833 Sun Mar  7 15:42:01 2004
+++ CVSROOT/avail   Wed Mar 10 00:35:09 2004
@@ -25,7 +25,7 @@
 # The PHP Documentation Group maintains the documentation and its
 # translations.
 
-avail|frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief977,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodive,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,tix,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,tony2001,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,ohill,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhitama,engkongs,preilly,dave,marcelo,curt,fd,javi,mrmaster,fa,nlopess,vrana,apaxx,pjotrik,marduk,narcotia1234,enloma,trizo,xmadda,redshift,alifikri,coder,dodol_maniac,eflorin,adywarna,kyokpae,milans,lovchy,spermwhale,phaze,baoengb,derek,yannick,daan,xxiengb,ott,mg,kennyt,tomsommer,poz,zamolxe,bishmila,ph1,irchtml,rogamer,bortolini,sapfir,guru,ahmed,robinhood,sohli,|phpdoc,ZendAPI,phpdoc-ar,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,livedocs
+avail|frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,c

[PHP-CVS] cvs: php-src /ext/spl README

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 12:47:28 2004 EDT

  Modified files:  
/php-src/ext/splREADME 
  Log:
  Update
  
http://cvs.php.net/diff.php/php-src/ext/spl/README?r1=1.6&r2=1.7&ty=u
Index: php-src/ext/spl/README
diff -u php-src/ext/spl/README:1.6 php-src/ext/spl/README:1.7
--- php-src/ext/spl/README:1.6  Tue Mar  9 11:58:11 2004
+++ php-src/ext/spl/README  Tue Mar  9 12:47:28 2004
@@ -4,11 +4,15 @@
 subdirectory. Based on the internal implementations or the files in the 
 examples subdirectory there are also some .php files to experiment with.
 
-The .inc files are not included automatically because the are sooner or 
+The .inc files are not included automatically because they are sooner or 
 later integrated into the extension. That means that you either need to 
 put the code of examples/autoload into your autoprepend file or that you
 have to point your ini setting auto_prepend_file to this file.
 
+Below is a list of interfaces/classes already availabel natively through
+the SPL extension grouped by category. For more information refer to the 
+docuement spl.php.
+
 1) Iterators
 
 SPL offers some advanced iterator algorithms:
@@ -17,23 +21,27 @@
 class RecursiveIteratorIterator implements Iterator
 abstract class FilterIterator implements Iterator
 class ParentIterator extends FilterIterator implements RecursiveIterator
+interface SeekableIterator implements Iterator
+class LimitIterator implements Iterator
+class CachingIterator implements Iterator
+class CachingRecursiveIterator extends CachingIterator implements RecursiveIterator
 
 2) Directories
 
-SPL offers two advanced directory classes.
+SPL offers two advanced directory classes:
 
 class DirectoryIterator implements Iterator
 class RecursiveDirectoryIterator extends DirectoryIterator implements 
RecursiveIterator
 
 3) XML
 
-SPL offers an advanced XML handling class.
+SPL offers an advanced XML handling class:
 
 class SimpleXMLIterator extends simplexml_element extends recursiveiterator
 
 4) Array Overloading
 
-SPL offers advanced Array overloading.
+SPL offers advanced Array overloading:
 
 class ArrayObject implements IteratorAggregate
 class ArrayIterator implements Iterator

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



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

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 12:36:34 2004 EDT

  Modified files:  
/php-src/ext/splspl.php 
  Log:
  Drop copydoc and add more classes/methods
  
http://cvs.php.net/diff.php/php-src/ext/spl/spl.php?r1=1.15&r2=1.16&ty=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.15 php-src/ext/spl/spl.php:1.16
--- php-src/ext/spl/spl.php:1.15Tue Mar  9 12:01:21 2004
+++ php-src/ext/spl/spl.php Tue Mar  9 12:36:32 2004
@@ -139,26 +139,6 @@
 * \param $array the array to use.
 */
private function __construct($array);
-
-   /** \copydoc Iterator::rewind
-*/
-   function rewind();
-
-   /** \copydoc Iterator::current
-*/
-   function current();
-
-   /** \copydoc Iterator::key
-*/
-   function key();
-
-   /** \copydoc Iterator::next
-*/
-   function next();
-
-   /** \copydoc Iterator::valid
-*/
-   function valid();
 }
 
 /** Iterator that wrapps around another iterator and only returns selected
@@ -176,26 +156,51 @@
 * used as a current element of this iterator or if it should be skipped.
 */
abstract function accept();
-
-   /** \copydoc Iterator::rewind
+   
+   /** \return the inner Iterator
 */
-   function rewind();
+   function getInnerIterator();
+}
 
-   /** \copydoc Iterator::current
+interface SeekableIterator implements Iterator
+{
+   /** Seek to a specific position if available or throw an exception.
 */
-   function current();
+   function seek($position);
+}
 
-   /** \copydoc Iterator::key
+/** A class that starts iteration at a certain offset and only iterates over
+ * a specified amount of elements.
+ */
+class LimitIetrator implements Iterator
+{
+   /** Construct an instance form a Iterator.
+*
+* \param $iterator inner iterator
+* \param $offset   starting position (zero based)
+* \param $countamount of elements returned, if available)
 */
-   function key();
+   function __construct(Iterator $iterator, $offset = 0, $count = -1);
 
-   /** \copydoc Iterator::next
+   /** \return whether the current element of the inner iterator should be
+* used as a current element of this iterator or if it should be skipped.
 */
-   function next();
-
-   /** \copydoc Iterator::valid
+   abstract function accept();
+   
+   /** \return the inner Iterator
+*/
+   function getInnerIterator();
+   
+   /** Seek to a specific position if available or throw an exception.
+* If the inner iterator is an instance of SeekableIterator its seek()
+* method will be used. Otherwise the iterator will me manually forwared
+* and rewinded first if necessary.
 */
-   function valid();
+   function seek($position);
+   
+   /** return the current position (zero based)
+*/
+   function getPosition();
 }
 
 /** A recursive iterator that only returns elements that themselves can be 
@@ -208,34 +213,50 @@
 * \param $iterator inner iterator
 */
function __construct(RecursiveIterator $iterator);
+}
 
-   /** \copydoc RecursiveIterator::hasChildren
-*/
-   function hasChildren();
-
-   /** \copydoc RecursiveIterator::getChildren
-*/
-   function getChildren();
-
-   /** \copydoc Iterator::rewind
+/** This Iterator allways reads one ahead. That allows it to know whether
+ * more elements are available.
+ */
+class CachingIterator implements Iterator
+{
+   /** Construct an instance form a RecursiveIterator.
+*
+* \param $iterator  inner iterator
+* \param $getStrVal whether to fetch the value returned by __toString()
+*   or the (string) conversion. This is optional since
+*   it is not always used nad takes an additional fcall.
 */
-   function rewind();
+   function __construct(Iterator $iterator, $getStrVal = false);
 
-   /** \copydoc Iterator::current
+   /** \return whether the inner iterator is valid. That is this iterator
+* is valid and has one more element.
 */
-   function current();
+   function hasNext();
 
-   /** \copydoc Iterator::key
+   /** \return The last value from the inner iterators __toString() or
+* (string) conversion. The value is only fetched when the __constructor
+* was called with $getStrVal = true.
 */
-   function key();
-
-   /** \copydoc Iterator::next
+   function __tostring();
+   
+   /** \return the inner Iterator
 */
-   function next();
+   function getInnerIterator();
+}
 
-   /** \copydoc Iterator::valid
+/** The recursive version of the CachingIterator.
+ */
+class CachingRecursiveIterator extends CachingIterator implemnets RecursiveIterator

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

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 12:35:25 2004 EDT

  Modified files:  
/php-src/ext/splspl_iterators.c 
  Log:
  Access to inner iterator was missing
  
http://cvs.php.net/diff.php/php-src/ext/spl/spl_iterators.c?r1=1.25&r2=1.26&ty=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.25 php-src/ext/spl/spl_iterators.c:1.26
--- php-src/ext/spl/spl_iterators.c:1.25Tue Mar  9 11:38:37 2004
+++ php-src/ext/spl/spl_iterators.c Tue Mar  9 12:35:18 2004
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_iterators.c,v 1.25 2004/03/09 16:38:37 helly Exp $ */
+/* $Id: spl_iterators.c,v 1.26 2004/03/09 17:35:18 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -595,6 +595,19 @@
spl_dual_it_construct(INTERNAL_FUNCTION_PARAM_PASSTHRU, zend_ce_iterator, 
DIT_Default);
 }
 
+SPL_METHOD(dual_it, getInnerIterator)
+{
+   spl_dual_it_object   *intern;
+
+   intern = (spl_dual_it_object*)zend_object_store_get_object(getThis() 
TSRMLS_CC);
+
+   if (intern->inner.zobject) {
+   RETVAL_ZVAL(intern->inner.zobject, 0, 0);
+   } else {
+   RETURN_NULL();
+   }
+}
+
 static INLINE void spl_dual_it_free(spl_dual_it_object *intern TSRMLS_DC)
 {
if (intern->current.data) {
@@ -840,12 +853,13 @@
 ZEND_END_ARG_INFO();
 
 static zend_function_entry spl_funcs_FilterIterator[] = {
-   SPL_ME(dual_it,__construct,   arginfo_filter_it___construct, 
ZEND_ACC_PUBLIC)
-   SPL_ME(FilterIterator, rewind,NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(dual_it,valid, NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(dual_it,key,   NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(dual_it,current,   NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(FilterIterator, next,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, __construct,  arginfo_filter_it___construct, 
ZEND_ACC_PUBLIC)
+   SPL_ME(FilterIterator,  rewind,   NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, valid,NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, key,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, current,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(FilterIterator,  next, NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, getInnerIterator, NULL, ZEND_ACC_PUBLIC)
SPL_ABSTRACT_ME(FilterIterator, accept, NULL)
{NULL, NULL, NULL}
 };
@@ -856,10 +870,11 @@
 ZEND_END_ARG_INFO();
 
 static zend_function_entry spl_funcs_ParentIterator[] = {
-   SPL_ME(ParentIterator, __construct,   arginfo_parent_it___construct, 
ZEND_ACC_PUBLIC)
-   SPL_MA(ParentIterator, accept,ParentIterator, hasChildren, NULL, 
ZEND_ACC_PUBLIC)
-   SPL_ME(ParentIterator, hasChildren,   NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(ParentIterator, getChildren,   NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(ParentIterator,  __construct,  arginfo_parent_it___construct, 
ZEND_ACC_PUBLIC)
+   SPL_MA(ParentIterator,  accept,   ParentIterator, hasChildren, NULL, 
ZEND_ACC_PUBLIC)
+   SPL_ME(ParentIterator,  hasChildren,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(ParentIterator,  getChildren,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, getInnerIterator, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
 
@@ -992,14 +1007,15 @@
 ZEND_END_ARG_INFO();
 
 static zend_function_entry spl_funcs_LimitIterator[] = {
-   SPL_ME(LimitIterator, __construct,   arginfo_limit_it___construct, 
ZEND_ACC_PUBLIC)
-   SPL_ME(LimitIterator, rewind,NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(LimitIterator, valid, NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(dual_it,   key,   NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(dual_it,   current,   NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(LimitIterator, next,  NULL, ZEND_ACC_PUBLIC)
-   SPL_ME(LimitIterator, seek,  arginfo_limit_it_seek, ZEND_ACC_PUBLIC)
-   SPL_ME(LimitIterator, getPosition,   NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(LimitIterator,   __construct,  arginfo_limit_it___construct, 
ZEND_ACC_PUBLIC)
+   SPL_ME(LimitIterator,   rewind,   NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(LimitIterator,   valid,NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, key,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, current,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(LimitIterator,   next, NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(LimitIterator,   seek, arginfo_limit_it_seek, 
ZEND_ACC_PUBLIC)
+   SPL_ME(LimitIterator,   getPosition,  NULL, ZEND_ACC_PUBLIC)
+   SPL_ME(dual_it, getInnerIterator, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
 };
 
@@ -1125,14 +1141,15 @@
 ZEND_END_ARG_INFO();
 
 static zend_function_entry spl_funcs_CachingIterator[] = {
-   SPL_ME(CachingIterator, __construct,   arg

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

2004-03-09 Thread Rasmus Lerdorf
rasmus  Tue Mar  9 12:11:24 2004 EDT

  Modified files:  
/php-src/ext/curl   interface.c 
  Log:
  Make curl_setopt($ch,CURLOPT_RETURNTRANSFER,0) reset the RETURNTRANSFER to
  stdout as is implied in the documentation.  Currently it simply does
  absolutely nothing and there is no way to reset it to stdout.
  
  
http://cvs.php.net/diff.php/php-src/ext/curl/interface.c?r1=1.32&r2=1.33&ty=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.32 php-src/ext/curl/interface.c:1.33
--- php-src/ext/curl/interface.c:1.32   Mon Feb 23 14:50:07 2004
+++ php-src/ext/curl/interface.cTue Mar  9 12:11:22 2004
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.32 2004/02/23 19:50:07 iliaa Exp $ */
+/* $Id: interface.c,v 1.33 2004/03/09 17:11:22 rasmus Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -918,6 +918,8 @@
 
if (Z_LVAL_PP(zvalue)) {
ch->handlers->write->method = PHP_CURL_RETURN;
+   } else {
+   ch->handlers->write->method = PHP_CURL_STDOUT;
}
break;
case CURLOPT_BINARYTRANSFER:

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



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

2004-03-09 Thread Rasmus Lerdorf
rasmus  Tue Mar  9 12:06:55 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/curl   curl.c 
  Log:
  Make curl_setopt($ch,CURLOPT_RETURNTRANSFER,0) reset the RETURNTRANSFER to
  stdout as is implied in the documentation.  Currently it simply does
  absolutely nothing and there is no way to reset it to stdout.
  
  
http://cvs.php.net/diff.php/php-src/ext/curl/curl.c?r1=1.124.2.16&r2=1.124.2.17&ty=u
Index: php-src/ext/curl/curl.c
diff -u php-src/ext/curl/curl.c:1.124.2.16 php-src/ext/curl/curl.c:1.124.2.17
--- php-src/ext/curl/curl.c:1.124.2.16  Mon Feb 23 14:50:47 2004
+++ php-src/ext/curl/curl.c Tue Mar  9 12:06:53 2004
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: curl.c,v 1.124.2.16 2004/02/23 19:50:47 iliaa Exp $ */
+/* $Id: curl.c,v 1.124.2.17 2004/03/09 17:06:53 rasmus Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -802,7 +802,9 @@
 
if (Z_LVAL_PP(zvalue)) {
ch->handlers->write->method = PHP_CURL_RETURN;
-   }
+   } else {
+   ch->handlers->write->method = PHP_CURL_STDOUT;
+   }   
break;
case CURLOPT_BINARYTRANSFER:
convert_to_long_ex(zvalue); 

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



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

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 12:01:23 2004 EDT

  Modified files:  
/php-src/ext/splspl.php 
  Log:
  Update
  
http://cvs.php.net/diff.php/php-src/ext/spl/spl.php?r1=1.14&r2=1.15&ty=u
Index: php-src/ext/spl/spl.php
diff -u php-src/ext/spl/spl.php:1.14 php-src/ext/spl/spl.php:1.15
--- php-src/ext/spl/spl.php:1.14Mon Mar  8 12:33:29 2004
+++ php-src/ext/spl/spl.php Tue Mar  9 12:01:21 2004
@@ -2,7 +2,7 @@
 
 /** Standard PHP Library
  *
- * (c) Marcus Boerger, 2003
+ * (c) Marcus Boerger, 2003 - 2004
  */
 
 /** Abstract base interface that cannot be implemented alone. Instead it
@@ -318,6 +318,22 @@
  */
 class SimpleXMLIterator extends simplexml_element implements RecursiveIterator
 {
+   /** \copydoc Iterator::rewind
+*/
+   function rewind();
+
+   /** \copydoc Iterator::current
+*/
+   function current();
+
+   /** \copydoc Iterator::next
+*/
+   function next();
+
+   /** \copydoc Iterator::valid
+*/
+   function valid();
+   
/** \return whether the current node has sub nodes.
 */
function hasChildren(); 

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



[PHP-CVS] cvs: php-src /ext/spl README

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 11:58:16 2004 EDT

  Modified files:  
/php-src/ext/splREADME 
  Log:
  Update
  
http://cvs.php.net/diff.php/php-src/ext/spl/README?r1=1.5&r2=1.6&ty=u
Index: php-src/ext/spl/README
diff -u php-src/ext/spl/README:1.5 php-src/ext/spl/README:1.6
--- php-src/ext/spl/README:1.5  Sat Jan 10 18:49:26 2004
+++ php-src/ext/spl/README  Tue Mar  9 11:58:11 2004
@@ -24,3 +24,19 @@
 
 class DirectoryIterator implements Iterator
 class RecursiveDirectoryIterator extends DirectoryIterator implements 
RecursiveIterator
+
+3) XML
+
+SPL offers an advanced XML handling class.
+
+class SimpleXMLIterator extends simplexml_element extends recursiveiterator
+
+4) Array Overloading
+
+SPL offers advanced Array overloading.
+
+class ArrayObject implements IteratorAggregate
+class ArrayIterator implements Iterator
+
+As the above suggest an ArrayObject creates an ArrayIterator when it comes to
+iteration (e.g. ArrayObject instance used inside foreach).

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



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

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 11:51:03 2004 EDT

  Modified files:  
/php-src/tests/classes  constants_scope_001.phpt 
  Log:
  Update test
  
http://cvs.php.net/diff.php/php-src/tests/classes/constants_scope_001.phpt?r1=1.1&r2=1.2&ty=u
Index: php-src/tests/classes/constants_scope_001.phpt
diff -u php-src/tests/classes/constants_scope_001.phpt:1.1 
php-src/tests/classes/constants_scope_001.phpt:1.2
--- php-src/tests/classes/constants_scope_001.phpt:1.1  Mon Mar  3 11:44:38 2003
+++ php-src/tests/classes/constants_scope_001.phpt  Tue Mar  9 11:51:02 2004
@@ -11,15 +11,28 @@
const INFO = "Informational message\n";
 
static function print_fatal_error_codes() {
-   echo "FATAL = " . FATAL;
+   echo "FATAL = " . FATAL . "\n";
echo "self::FATAL = " . self::FATAL;
 }
 }
 
+class ErrorCodesDerived extends ErrorCodes {
+   const FATAL = "Worst error\n";
+   static function print_fatal_error_codes() {
+   echo "self::FATAL = " . self::FATAL;
+   echo "parent::FATAL = " . parent::FATAL;
+}
+}
+
 /* Call the static function and move into the ErrorCodes scope */
 ErrorCodes::print_fatal_error_codes();
+ErrorCodesDerived::print_fatal_error_codes();
 
 ?>
---EXPECT--
-FATAL = Fatal error
+--EXPECTF--
+
+Notice: Use of undefined constant FATAL - assumed 'FATAL' in 
%sconstants_scope_001.php on line %d
+FATAL = FATAL
 self::FATAL = Fatal error
+self::FATAL = Worst error
+parent::FATAL = Fatal error

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



[PHP-CVS] cvs: php-src /ext/spl spl_functions.c spl_iterators.c ZendEngine2 zend_API.c zend_compile.c zend_compile.h zend_execute.c zend_execute_API.c zend_interfaces.c zend_language_parser.y zend_reflection_api.c

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 11:38:38 2004 EDT

  Modified files:  
/ZendEngine2zend_API.c zend_compile.c zend_compile.h 
zend_execute.c zend_execute_API.c zend_interfaces.c 
zend_language_parser.y zend_reflection_api.c 
/php-src/ext/splspl_functions.c spl_iterators.c 
  Log:
  Clearify the different method/class flags (as discussed with Andi).
  
  http://cvs.php.net/diff.php/ZendEngine2/zend_API.c?r1=1.245&r2=1.246&ty=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.245 ZendEngine2/zend_API.c:1.246
--- ZendEngine2/zend_API.c:1.245Tue Mar  2 11:17:58 2004
+++ ZendEngine2/zend_API.c  Tue Mar  9 11:38:33 2004
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: zend_API.c,v 1.245 2004/03/02 16:17:58 helly Exp $ */
+/* $Id: zend_API.c,v 1.246 2004/03/09 16:38:33 helly Exp $ */
 
 #include "zend.h"
 #include "zend_execute.h"
@@ -1237,11 +1237,12 @@
if (ptr->flags & ZEND_ACC_ABSTRACT) {
if (scope) {
/* This is a class that must be abstract itself. Here 
we set the check info. */
-   scope->ce_flags |= ZEND_ACC_ABSTRACT;
+   scope->ce_flags |= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
if (!(scope->ce_flags & ZEND_ACC_INTERFACE)) {
/* Since the class is not an interface it 
needs to be declared as a abstract class. */
+   /* Since here we are handling internal 
functions only we can add the keyword flag. */
/* This time we set the flag for the keyword 
'abstratc'. */
-   scope->ce_flags |= ZEND_ACC_ABSTRACT_CLASS;
+   scope->ce_flags |= 
ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
}
}
} else {
@@ -1522,7 +1523,7 @@
 
 ZEND_API zend_class_entry *zend_register_internal_interface(zend_class_entry 
*orig_class_entry TSRMLS_DC)
 {
-   return do_register_internal_class(orig_class_entry, 
ZEND_ACC_ABSTRACT|ZEND_ACC_INTERFACE TSRMLS_CC);
+   return do_register_internal_class(orig_class_entry, ZEND_ACC_INTERFACE 
TSRMLS_CC);
 }
 
 ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.555&r2=1.556&ty=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.555 ZendEngine2/zend_compile.c:1.556
--- ZendEngine2/zend_compile.c:1.555Tue Mar  9 10:27:39 2004
+++ ZendEngine2/zend_compile.c  Tue Mar  9 11:38:33 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: zend_compile.c,v 1.555 2004/03/09 15:27:39 andi Exp $ */
+/* $Id: zend_compile.c,v 1.556 2004/03/09 16:38:33 helly Exp $ */
 
 #include "zend_language_parser.h"
 #include "zend.h"
@@ -974,7 +974,7 @@
}
 
if (fn_flags & ZEND_ACC_ABSTRACT) {
-   CG(active_class_entry)->ce_flags |= ZEND_ACC_ABSTRACT;
+   CG(active_class_entry)->ce_flags |= 
ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
}
 
if (!(fn_flags & ZEND_ACC_PPP_MASK)) {
@@ -1749,8 +1749,8 @@
TSRMLS_FETCH();
 
if (zend_hash_quick_find(child_function_table, hash_key->arKey, 
hash_key->nKeyLength, hash_key->h, (void **) &child)==FAILURE) {
-   if (parent_flags & ZEND_ACC_ABSTRACT) {
-   child_ce->ce_flags |= ZEND_ACC_ABSTRACT;
+   if (parent_flags & (ZEND_ACC_ABSTRACT)) {
+   child_ce->ce_flags |= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
}
return 1; /* method doesn't exist in child, copy from parent */
}
@@ -2537,8 +2537,7 @@
if (ce->num_interfaces > 0) {
ce->interfaces = (zend_class_entry **) erealloc(ce->interfaces, 
sizeof(zend_class_entry *)*ce->num_interfaces);
}
-   if (!(ce->ce_flags & ZEND_ACC_INTERFACE)
-   && !(ce->ce_flags & ZEND_ACC_ABSTRACT_CLASS)
+   if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))
&& ((parent_token->op_type != IS_UNUSED) || (ce->num_interfaces > 0))) 
{
zend_verify_abstract_class(ce TSRMLS_CC);
if (ce->parent || ce->num_interfaces) {
http://cvs.php.net/diff.php/ZendEngine2/zend_compile.h?r1=1.281&r2=1.282&ty=u
Index: ZendEngine2/zend_compile.h
diff -u ZendEngine2/zend_compile.h:1.281 ZendEngine2/zend_compile.h:1.282
--- ZendEngine2/zend_compile.h:1.281Tue Mar  9 10:27:39 2004
+++ ZendEngine2/zend_compile.h  Tue Mar  9 11:38:33 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/*

Re: [PHP-CVS] cvs: php-src / NEWS

2004-03-09 Thread Moriyoshi Koizumi
On 2004/03/09, at 21:59, Jani Taskinen wrote:

On Mon, 1 Mar 2004, Moriyoshi Koizumi wrote:

moriyoshi		Mon Mar  1 05:46:15 2004 EDT

 Modified files:
   /php-src NEWS
 Log:
 - NFN
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1620&r2=1.1621&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1620 php-src/NEWS:1.1621
--- php-src/NEWS:1.1620	Sun Feb 29 14:07:56 2004
+++ php-src/NEWS	Mon Mar  1 05:46:14 2004
@@ -2,6 +2,9 @@
|| 
|
?? March 2004, PHP 5 Release Candidate 1
- Upgraded bundled oniguruma library to version 2.2.2. (Rui,  
Moriyoshi)
+- Add support for more ISO8601 style datetime formats. (Moriyoshi)
+  . Timezone specifier (ex. "20040301T02:00:00+19:00")
+  . Week specifier (ex. "1997W021")
Support in what exactly? (what functions/extension?)
strtotime(). It should have been more descriptive :)

Moriyoshi

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


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

2004-03-09 Thread Ilia Alshanetsky
iliaa   Tue Mar  9 10:04:17 2004 EDT

  Modified files:  
/php-src/ext/curl   multi.c 
  Log:
  Fixed memory leak with curl_multi_init() de-initialization.
  
  
http://cvs.php.net/diff.php/php-src/ext/curl/multi.c?r1=1.13&r2=1.14&ty=u
Index: php-src/ext/curl/multi.c
diff -u php-src/ext/curl/multi.c:1.13 php-src/ext/curl/multi.c:1.14
--- php-src/ext/curl/multi.c:1.13   Thu Jan  8 03:14:37 2004
+++ php-src/ext/curl/multi.cTue Mar  9 10:04:16 2004
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: multi.c,v 1.13 2004/01/08 08:14:37 andi Exp $ */
+/* $Id: multi.c,v 1.14 2004/03/09 15:04:16 iliaa Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -250,7 +250,11 @@
 void _php_curl_multi_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
 {
php_curlm *mh = (php_curlm *) rsrc->ptr;
-   curl_multi_cleanup(mh->multi);
+   if (mh) {
+   curl_multi_cleanup(mh->multi);
+   efree(mh);
+   rsrc->ptr = NULL;
+   }
/* XXX: keep track of all curl handles and zval_ptr_dtor them here */
 }
 

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



[PHP-CVS] cvs: php-src / run-tests.php

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 09:39:36 2004 EDT

  Modified files:  
/php-srcrun-tests.php 
  Log:
  Make run-tests.php work with xdebug being loaded.
  # Lots of ppl use that as a built-in extension already.
  
  
http://cvs.php.net/diff.php/php-src/run-tests.php?r1=1.188&r2=1.189&ty=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.188 php-src/run-tests.php:1.189
--- php-src/run-tests.php:1.188 Fri Jan 16 10:17:37 2004
+++ php-src/run-tests.php   Tue Mar  9 09:39:35 2004
@@ -178,6 +178,7 @@
'auto_prepend_file=',
'auto_append_file=',
'magic_quotes_runtime=0',
+   'xdebug.default_enable=0',
);
 $info_params = array();
 settings2array($ini_overwrites,$info_params);

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



[PHP-CVS] cvs: php-src /ext/pgsql/tests 02connection.phpt

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 09:37:50 2004 EDT

  Modified files:  
/php-src/ext/pgsql/tests02connection.phpt 
  Log:
  Show the connect result
  
http://cvs.php.net/diff.php/php-src/ext/pgsql/tests/02connection.phpt?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/pgsql/tests/02connection.phpt
diff -u php-src/ext/pgsql/tests/02connection.phpt:1.2 
php-src/ext/pgsql/tests/02connection.phpt:1.3
--- php-src/ext/pgsql/tests/02connection.phpt:1.2   Mon May 19 20:14:46 2003
+++ php-src/ext/pgsql/tests/02connection.phpt   Tue Mar  9 09:37:49 2004
@@ -9,6 +9,8 @@
 include('config.inc');
 
 $db = pg_pconnect($conn_str);
+var_dump($db);
+
 if (pg_connection_status($db) != PGSQL_CONNECTION_OK) 
 {
echo "pg_connection_status() error\n";
@@ -44,7 +46,8 @@
 
 pg_close($db);
 
-echo "OK";
 ?>
---EXPECT--
-OK
+===DONE===
+--EXPECTF--
+resource(%d) of type (pgsql link%s)
+===DONE===

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



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

2004-03-09 Thread Marcus Boerger
helly   Tue Mar  9 09:29:22 2004 EDT

  Modified files:  
/php-src/ext/mysqli mysqli.c 
  Log:
  Missing buffer->val change
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli.c?r1=1.33&r2=1.34&ty=u
Index: php-src/ext/mysqli/mysqli.c
diff -u php-src/ext/mysqli/mysqli.c:1.33 php-src/ext/mysqli/mysqli.c:1.34
--- php-src/ext/mysqli/mysqli.c:1.33Thu Feb 26 06:40:35 2004
+++ php-src/ext/mysqli/mysqli.c Tue Mar  9 09:29:20 2004
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>|
   +--+
 
-  $Id: mysqli.c,v 1.33 2004/02/26 11:40:35 georg Exp $ 
+  $Id: mysqli.c,v 1.34 2004/03/09 14:29:20 helly Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -66,7 +66,7 @@
for (i=0; i < bbuf.var_cnt; i++) {
if (type == FETCH_RESULT) {
if (bbuf.buf[i].type == IS_STRING) {
-   efree(bbuf.buf[i].buffer);
+   efree(bbuf.buf[i].val);
}
}
if (bbuf.vars[i]) {

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



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/standard/tests/strings bug27457.phpt

2004-03-09 Thread Jani Taskinen
sniper  Tue Mar  9 09:20:14 2004 EDT

  Added files: (Branch: PHP_4_3)
/php-src/ext/standard/tests/strings bug27457.phpt 
  Log:
  test for bug #27457
  

http://cvs.php.net/co.php/php-src/ext/standard/tests/strings/bug27457.phpt?r=1.1&p=1
Index: php-src/ext/standard/tests/strings/bug27457.phpt
+++ php-src/ext/standard/tests/strings/bug27457.phpt
--TEST--
Bug #27457 (Problem with strtr() and translation array)
--FILE--
 '0'));
echo $test;
$test = strtr($test, array('0' => '.'));
echo $test;
$test = strtr($test, '.', '0');
echo $test;
$test = strtr($test, '0', '.');
echo $test;
?>
--EXPECT--
Dot in brackets [.]
Dot in brackets [0]
Dot in brackets [.]
Dot in brackets [0]
Dot in brackets [.]

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



[PHP-CVS] cvs: php-src /ext/standard/tests/strings bug27457.phpt

2004-03-09 Thread Jani Taskinen
sniper  Tue Mar  9 09:19:51 2004 EDT

  Added files: 
/php-src/ext/standard/tests/strings bug27457.phpt 
  Log:
  test for bug #27457
  

http://cvs.php.net/co.php/php-src/ext/standard/tests/strings/bug27457.phpt?r=1.1&p=1
Index: php-src/ext/standard/tests/strings/bug27457.phpt
+++ php-src/ext/standard/tests/strings/bug27457.phpt
--TEST--
Bug #27457 (Problem with strtr() and translation array)
--FILE--
 '0'));
echo $test;
$test = strtr($test, array('0' => '.'));
echo $test;
$test = strtr($test, '.', '0');
echo $test;
$test = strtr($test, '0', '.');
echo $test;
?>
--EXPECT--
Dot in brackets [.]
Dot in brackets [0]
Dot in brackets [.]
Dot in brackets [0]
Dot in brackets [.]

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



Re: [PHP-CVS] cvs: php-src / NEWS

2004-03-09 Thread Jani Taskinen
On Mon, 1 Mar 2004, Moriyoshi Koizumi wrote:

>moriyoshi  Mon Mar  1 05:46:15 2004 EDT
>
>  Modified files:  
>/php-src   NEWS 
>  Log:
>  - NFN
>  
>  
>http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1620&r2=1.1621&ty=u
>Index: php-src/NEWS
>diff -u php-src/NEWS:1.1620 php-src/NEWS:1.1621
>--- php-src/NEWS:1.1620Sun Feb 29 14:07:56 2004
>+++ php-src/NEWS   Mon Mar  1 05:46:14 2004
>@@ -2,6 +2,9 @@
> |||
> ?? March 2004, PHP 5 Release Candidate 1
> - Upgraded bundled oniguruma library to version 2.2.2. (Rui, Moriyoshi)
>+- Add support for more ISO8601 style datetime formats. (Moriyoshi)
>+  . Timezone specifier (ex. "20040301T02:00:00+19:00")
>+  . Week specifier (ex. "1997W021")

Support in what exactly? (what functions/extension?)

--Jani

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



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

2004-03-09 Thread Jani Taskinen
sniper  Tue Mar  9 07:52:10 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-srcNEWS 
  Log:
  order
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.587&r2=1.1247.2.588&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.587 php-src/NEWS:1.1247.2.588
--- php-src/NEWS:1.1247.2.587   Mon Mar  8 21:24:19 2004
+++ php-src/NEWSTue Mar  9 07:52:08 2004
@@ -25,13 +25,13 @@
 - Fixed bug #27293 (two crashes inside image2wbmp()). (Ilia)
 - Fixed bug #27278 (*printf() functions treat arguments as if passed by
   reference). (Ilia)
+- Fixed bug #27238 (iptcparse() function misses some fields). (Pierre)
 - Fixed bug #26753 (zend_fetch_list_dtor_id() doesn't check NULL strings).
   (Jani, Markus dot Lidel at shadowconnect dot com)
 - Fixed bug #26005 (Random "cannot change the session ini settings" errors).
   (Jani, jsnajdr at kerio dot com)
 - Fixed bug #21760 (Use of uninitialized pointer inside php_read()). (Ilia, 
   uce at ftc dot gov)
-- Fixed bug #27238 (iptcparse() function misses some fields). (Pierre)
 
 16 Feb 2004, Version 4.3.5RC3
 - Fixed zero bytes memory allocation when no extra ini files are found in the

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



[PHP-CVS] cvs: php-src /ext/mysqli config.m4 mysqli_api.c mysqli_fe.c php_mysqli.h

2004-03-09 Thread Georg Richter
georg   Tue Mar  9 07:01:26 2004 EDT

  Modified files:  
/php-src/ext/mysqli config.m4 mysqli_api.c mysqli_fe.c php_mysqli.h 
  Log:
  fixed memleaks in bind functions
  added 4.1.2 support (renamed functions)
  
  http://cvs.php.net/diff.php/php-src/ext/mysqli/config.m4?r1=1.14&r2=1.15&ty=u
Index: php-src/ext/mysqli/config.m4
diff -u php-src/ext/mysqli/config.m4:1.14 php-src/ext/mysqli/config.m4:1.15
--- php-src/ext/mysqli/config.m4:1.14   Fri Feb 20 08:09:14 2004
+++ php-src/ext/mysqli/config.m4Tue Mar  9 07:01:23 2004
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.14 2004/02/20 13:09:14 georg Exp $
+dnl $Id: config.m4,v 1.15 2004/03/09 12:01:23 georg Exp $
 dnl config.m4 for extension mysqli
 
 PHP_ARG_WITH(mysqli, for MySQLi support,
@@ -39,11 +39,15 @@
   dnl
   dnl Check the library
   dnl
-  PHP_CHECK_LIBRARY(mysqlclient, mysql_bind_param,
+  PHP_CHECK_LIBRARY(mysqlclient, mysql_set_server_option,
   [
 PHP_EVAL_INCLINE($MYSQLI_INCLINE)
 PHP_EVAL_LIBLINE($MYSQLI_LIBLINE, MYSQLI_SHARED_LIBADD)
 AC_DEFINE(HAVE_MYSQLILIB,1,[ ])
+PHP_CHECK_LIBRARY(mysqlclient, mysql_bind_param,
+[
+   AC_DEFINE(HAVE_MYSQLI_OLDAPI,1,[ ])
+],[],[])
   ],[
 AC_MSG_ERROR([wrong mysql library version or lib not found. Check config.log for 
more information.])
   ],[
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.77&r2=1.78&ty=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.77 php-src/ext/mysqli/mysqli_api.c:1.78
--- php-src/ext/mysqli/mysqli_api.c:1.77Thu Feb 26 07:24:21 2004
+++ php-src/ext/mysqli/mysqli_api.c Tue Mar  9 07:01:23 2004
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>|
   +--+
 
-  $Id: mysqli_api.c,v 1.77 2004/02/26 12:24:21 georg Exp $ 
+  $Id: mysqli_api.c,v 1.78 2004/03/09 12:01:23 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -68,9 +68,9 @@
 }
 /* }}} */
 
-/* {{{ proto bool mysqli_bind_param(object stmt, string types, mixed variable 
[,mixed,])
+/* {{{ proto bool mysqli_stmt_bind_param(object stmt, string types, mixed variable 
[,mixed,])
Bind variables to a prepared statement as parameters */
-PHP_FUNCTION(mysqli_bind_param)
+PHP_FUNCTION(mysqli_stmt_bind_param)
 {
zval***args;
int argc = ZEND_NUM_ARGS();
@@ -170,8 +170,11 @@
}
ofs++;
}
-   
+#ifndef HAVE_MYSQLI_OLDAPI 
+   rc = mysql_stmt_bind_param(stmt->stmt, bind);
+#else
rc = mysql_bind_param(stmt->stmt, bind);
+#endif
MYSQLI_REPORT_STMT_ERROR(stmt->stmt);
 
if (rc) {
@@ -197,14 +200,14 @@
 }
 /* }}} */
 
-/* {{{ proto bool mysqli_bind_result(object stmt, mixed var, [,mixed, ...])
+/* {{{ proto bool mysqli_stmt_bind_result(object stmt, mixed var, [,mixed, ...])
Bind variables to a prepared statement for result storage */
 
 /* TODO:
do_alloca, free_alloca
 */
 
-PHP_FUNCTION(mysqli_bind_result)
+PHP_FUNCTION(mysqli_stmt_bind_result)
 {
zval***args;
int argc = ZEND_NUM_ARGS();
@@ -243,6 +246,7 @@
 
if (var_cnt != stmt->stmt->field_count) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of bind variables 
doesn't match number of fields in prepared statmement.");
+   efree(args);
RETURN_FALSE;
}
 
@@ -266,9 +270,12 @@
case MYSQL_TYPE_FLOAT:
convert_to_double_ex(args[i]);
stmt->result.buf[ofs].type = IS_DOUBLE;
-   stmt->result.buf[ofs].buflen = 0;
+   stmt->result.buf[ofs].buflen = sizeof(double);
+   
+   /* allocate buffer for double */
+   stmt->result.buf[ofs].val = (char 
*)emalloc(sizeof(double));
bind[ofs].buffer_type = MYSQL_TYPE_DOUBLE;
-   bind[ofs].buffer = (gptr)&Z_DVAL_PP(args[i]);
+   bind[ofs].buffer = stmt->result.buf[ofs].val;
bind[ofs].is_null = &stmt->result.is_null[ofs];
break;
 
@@ -280,17 +287,18 @@
convert_to_long_ex(args[i]);
stmt->result.buf[ofs].type = IS_LONG;
stmt->result.buf[ofs].buflen = 0;
+   stmt->result.buf[ofs].val = (char 
*)emalloc(sizeof(long));
bind[ofs].buffer_type = MYSQL_TYPE_LONG;
-   bind[ofs].buffer = (gptr)&Z_LVAL_PP(args[i]);
+   bind[ofs].buffer = stmt->result.buf[ofs].val;
bind[ofs].is_null = &stmt->r

[PHP-CVS] cvs: php-src /tests/lang bug27535.phpt

2004-03-09 Thread Derick Rethans
derick  Tue Mar  9 03:19:23 2004 EDT

  Added files: 
/php-src/tests/lang bug27535.phpt 
  Log:
  - Added test for bug #27535 (Objects pointing to each other cause Apache to
crash).
  
  

http://cvs.php.net/co.php/php-src/tests/lang/bug27535.phpt?r=1.1&p=1
Index: php-src/tests/lang/bug27535.phpt
+++ php-src/tests/lang/bug27535.phpt
--TEST--
Bug #27535 (Objects pointing to each other cause Apache to crash)
--FILE--
storage = new Class1();

$this->storage->_Class2_obj = $this;
}
}

$foo = new Class2();

?>
Alive!
--EXPECT--
Alive!

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