pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:1:
/* -*- c -*-
-
* $Id: builtin.cmod,v 1.
20
2001/06/21
00
:
25
:
15
per Exp $
+
* $Id: builtin.cmod,v 1.
21
2001/06/21
01
:
21
:
50
per 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:537:
PIKEFUN string get( ) /*! @decl string get() *! *! Get the data from the buffer. *! *! @note *! This will clear the data in the buffer */ { struct Buffer_struct *str = THIS;
+
if( str->str.s )
+
{
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("");
+
}
INIT { struct Buffer_struct *str = THIS; MEMSET( str, 0, sizeof( *str ) ); } EXIT { struct Buffer_struct *str = THIS;