pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*- -  * $Id: builtin.cmod,v 1.57 2001/07/05 13:04:42 grubba Exp $ +  * $Id: builtin.cmod,v 1.58 2001/07/11 17:57:23 mast Exp $    */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "opcodes.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"
pike.git/src/builtin.cmod:1360:    struct pike_string *s = finish_string_builder( &str->str );    str->str.malloced = 0;    str->str.s = 0;    RETURN s;    }    pop_n_elems(args);    push_text("");    return;    }    +  PIKEFUN int _sizeof() +  /*! @decl int _sizeof() +  *! +  *! Returns the size of the buffer. +  */ +  { +  struct Buffer_struct *str = THIS; +  RETURN str->str.s ? str->str.s->len : 0; +  } +     INIT    {    struct Buffer_struct *str = THIS;    MEMSET( str, 0, sizeof( *str ) );    }       EXIT    {    struct Buffer_struct *str = THIS;    if( str->str.s )