*** empty log message ***
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* $Id: stx.c,v 1.2 2005-05-08 10:31:24 bacon Exp $
|
||||
* $Id: stx.c,v 1.3 2005-05-08 10:44:58 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <xp/stx/stx.h>
|
||||
#include <xp/stx/memory.h>
|
||||
#include <xp/bas/memory.h>
|
||||
#include <xp/bas/assert.h>
|
||||
|
||||
xp_stx_t* xp_stx_open (xp_stx_t* stx, xp_stx_word_t capacity)
|
||||
{
|
||||
@ -33,4 +34,16 @@ void xp_stx_close (xp_stx_t* stx)
|
||||
if (stx->__malloced) xp_free (stx);
|
||||
}
|
||||
|
||||
int xp_stx_bootstrap (xp_stx_t* stx)
|
||||
{
|
||||
stx->nil = xp_stx_memory_alloc (&stx->memory, 0);
|
||||
stx->true = xp_stx_memory_alloc (&stx->memory, 0);
|
||||
stx->false = xp_stx_memory_alloc (&stx->memory, 0);
|
||||
|
||||
xp_assert (stx->nil == XP_STX_NIL);
|
||||
xp_assert (stx->true == XP_STX_TRUE);
|
||||
xp_assert (stx->false == XP_STX_FALSE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stx.h,v 1.2 2005-05-08 10:31:24 bacon Exp $
|
||||
* $Id: stx.h,v 1.3 2005-05-08 10:44:58 bacon Exp $
|
||||
*/
|
||||
|
||||
#ifndef _XP_STX_STX_H_
|
||||
@ -115,8 +115,6 @@ struct xp_stx_t
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -124,6 +122,8 @@ extern "C" {
|
||||
xp_stx_t* xp_stx_open (xp_stx_t* stx, xp_stx_word_t capacity);
|
||||
void xp_stx_close (xp_stx_t* stx);
|
||||
|
||||
int xp_stx_bootstrap (xp_stx_t* stx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user