2004-07-16 02:26:21 -04:00
|
|
|
typedef struct {
|
|
|
|
/* always tag_header(SBUF_TYPE) */
|
|
|
|
CELL header;
|
2005-05-05 22:30:58 -04:00
|
|
|
/* tagged */
|
2004-07-16 02:26:21 -04:00
|
|
|
CELL top;
|
2004-11-27 22:26:05 -05:00
|
|
|
/* tagged */
|
|
|
|
CELL string;
|
2004-12-10 21:46:42 -05:00
|
|
|
} F_SBUF;
|
2004-07-16 02:26:21 -04:00
|
|
|
|
2005-05-05 22:30:58 -04:00
|
|
|
INLINE CELL sbuf_capacity(F_SBUF* sbuf)
|
|
|
|
{
|
|
|
|
return untag_fixnum_fast(sbuf->top);
|
|
|
|
}
|
|
|
|
|
2004-12-10 21:46:42 -05:00
|
|
|
INLINE F_SBUF* untag_sbuf(CELL tagged)
|
2004-07-16 02:26:21 -04:00
|
|
|
{
|
|
|
|
type_check(SBUF_TYPE,tagged);
|
2004-12-10 21:46:42 -05:00
|
|
|
return (F_SBUF*)UNTAG(tagged);
|
2004-07-16 02:26:21 -04:00
|
|
|
}
|
|
|
|
|
2004-12-10 21:46:42 -05:00
|
|
|
F_SBUF* sbuf(F_FIXNUM capacity);
|
2004-07-16 02:26:21 -04:00
|
|
|
|
|
|
|
void primitive_sbuf(void);
|
2005-05-18 16:26:22 -04:00
|
|
|
void primitive_sbuf_to_string(void);
|
2004-12-10 21:46:42 -05:00
|
|
|
void fixup_sbuf(F_SBUF* sbuf);
|
|
|
|
void collect_sbuf(F_SBUF* sbuf);
|