pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:2860:
*/ PIKECLASS Buffer { CVAR struct string_builder str; CVAR int initial; void f_Buffer_get_copy( INT32 args ); void f_Buffer_get( INT32 args ); void f_Buffer_add( INT32 args );
-
typedef void (_low_f_sprintf)(INT32, int, struct string_builder *);
-
static _low_f_sprintf *low_f_sprintf;
-
+
/*! @decl void create(int initial_size) *! *! Initializes a new buffer. *! *! If no @[initial_size] is specified, 256 is used. If you *! know approximately how big the buffer will be, you can optimize *! the operation of @[add()] (slightly) by passing the size to this *! function. */ PIKEFUN void create( int|void size )
pike.git/src/builtin.cmod:3216:
PIKEFUN int _sizeof() { 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 ) );
-
low_f_sprintf = PIKE_MODULE_IMPORT(sprintf, low_f_sprintf);
+
} EXIT gc_trivial; { struct Buffer_struct *str = THIS; if( str->str.s ) free_string_builder( &str->str ); }