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.
23
2001/
06
/
25
20
:
06
:
48
grubba
Exp $
+
* $Id: builtin.cmod,v 1.
24
2001/
07
/
11
17
:
57
:
22
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:549:
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 )