pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:3310:    *! Create a new timer object. The timer keeps track of relative time    *! with sub-second precision.    *!    *! If @[fast] is specified, the timer will not do system calls to get    *! the current time but instead use the one maintained by pike. This    *! will result in faster but more or less inexact timekeeping.    *! The pike maintained time is only updated when a @[Pike.Backend]    *! object stops waiting and starts executing code.    */    PIKEFUN void create( int|zero|void fast ) +  flags ID_PROTECTED;    {    extern struct timeval current_time;    THIS->hard_update = !fast;    if( THIS->hard_update )    GETTIMEOFDAY( &current_time );    THIS->last_time = current_time;    }   }      /*! @endclass
pike.git/src/builtin.cmod:4212:    *!    *! @returns    *! Returns @expr{1@} if the list is empty,    *! and @expr{0@} (zero) if there are elements in the list.    */    PIKEFUN int(0..1) is_empty()    {    push_int(!THIS->head->next);    }    -  /*! @decl int(0..) _sizeof() +  /*! @decl protected int(0..) _sizeof()    *!    *! Returns the number of elements in the list.    */    PIKEFUN int(0..) _sizeof()    flags ID_PROTECTED;    {    push_int(THIS->num_elems);    }    -  /*! @decl string _sprintf(int c, mapping(string:mixed)|void attr) +  /*! @decl protected string _sprintf(int c, mapping(string:mixed)|void attr)    *!    *! Describe the list.    *!    *! @seealso    *! @[sprintf()], @[lfun::_sprintf()]    */    PIKEFUN string _sprintf(int c, mapping(string:mixed)|void attr)    flags ID_PROTECTED;    {    if (!THIS->num_elems) {
pike.git/src/builtin.cmod:4370:    while (args--) {    struct pike_list_node *new_node = alloc_pike_list_node();    new_node->val = *(--Pike_sp);    prepend_list_node(node, new_node);    free_list_node(node = new_node);    THIS->num_elems++;    }    push_int(0);    }    -  /*! @decl void create(mixed ... values) +  /*! @decl protected void create(mixed ... values)    *!    *! Create a new @[List], and initialize it with @[values].    *!    *! @fixme    *! Ought to reset the @[List] if called multiple times.    */    PIKEFUN void create(mixed ... values)    flags ID_PROTECTED;    {    /* FIXME: Reset the list? */