Branch: Tag:

2005-03-23

2005-03-23 18:18:37 by Martin Stjernholm <mast@lysator.liu.se>

Made the result iterator somewhat more convenient: next() now advances
one step past the end so the next fetch() returns zero.

Rev: lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1.83

2:      // LDAP client protocol implementation for Pike.   // - // $Id: client.pike,v 1.82 2005/03/14 16:19:10 mast Exp $ + // $Id: client.pike,v 1.83 2005/03/23 18:18:37 mast Exp $   //   // Honza Petrous, hop@unibase.cz   //
394:    //! @seealso    //! @[LDAP.client.result.next]    int next() { -  if (actnum < (num_entries()-1)) { +  if (actnum < sizeof (entry))    actnum++;    return count_entries();    } -  return 0; -  } +        array(mapping(string:array(string))) fetch_all()    //! Convenience function to fetch all entries at once. The cursor
491: Inside #if undefined(PARSE_RFCS)
   void create(string|void url, object|void context)    {    -  info = ([ "code_revision" : ("$Revision: 1.82 $"/" ")[1] ]); +  info = ([ "code_revision" : ("$Revision: 1.83 $"/" ")[1] ]);       if(!url || !sizeof(url))    url = LDAP_DEFAULT_URL;