pike.git/
src/
builtin.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2001-07-11
2001-07-11 17:57:23 by Martin Stjernholm <mast@lysator.liu.se>
edb08412c9ef5296ca6dc701cb429a5b1d325ba4 (
13
lines) (+
12
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Added _sizeof to String.Buffer.
Rev: src/builtin.cmod:1.58
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"
1367:
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;