*** empty log message ***

This commit is contained in:
hyung-hwan 2005-05-10 15:15:58 +00:00
parent 6ef4cc08c2
commit d5631c8781
4 changed files with 11 additions and 7 deletions

View File

@ -1,9 +1,10 @@
/* /*
* $Id: object.c,v 1.9 2005-05-10 15:12:31 bacon Exp $ * $Id: object.c,v 1.10 2005-05-10 15:15:57 bacon Exp $
*/ */
#include <xp/stx/object.h> #include <xp/stx/object.h>
#include <xp/stx/memory.h> #include <xp/stx/memory.h>
#include <xp/stx/hash.h>
#include <xp/bas/assert.h> #include <xp/bas/assert.h>
#include <xp/bas/stdarg.h> #include <xp/bas/stdarg.h>
@ -80,7 +81,7 @@ xp_stx_word_t xp_stx_allocn_string_object (xp_stx_t* stx, ...)
while ((p = xp_va_arg(ap, const xp_stx_char_t*)) != XP_NULL) { while ((p = xp_va_arg(ap, const xp_stx_char_t*)) != XP_NULL) {
n += xp_stx_strlen(p); n += xp_stx_strlen(p);
} }
xp_va_end (ap, stx); xp_va_end (ap);
idx = xp_stx_memory_alloc (&stx->memory, idx = xp_stx_memory_alloc (&stx->memory,
(n + 1) * xp_sizeof(xp_stx_char_t) + xp_sizeof(xp_stx_object_t)); (n + 1) * xp_sizeof(xp_stx_char_t) + xp_sizeof(xp_stx_object_t));
@ -97,7 +98,7 @@ xp_stx_word_t xp_stx_allocn_string_object (xp_stx_t* stx, ...)
while (*p != XP_STX_CHAR('\0')) while (*p != XP_STX_CHAR('\0'))
XP_STX_CHARAT(stx,idx,n) = *p++; XP_STX_CHARAT(stx,idx,n) = *p++;
} }
xp_va_end (ap, stx); xp_va_end (ap);
return idx; return idx;
} }

View File

@ -1,5 +1,5 @@
/* /*
* $Id: object.h,v 1.7 2005-05-10 15:12:31 bacon Exp $ * $Id: object.h,v 1.8 2005-05-10 15:15:57 bacon Exp $
*/ */
#ifndef _XP_STX_OBJECT_H_ #ifndef _XP_STX_OBJECT_H_
@ -8,7 +8,7 @@
#include <xp/stx/stx.h> #include <xp/stx/stx.h>
#define XP_STX_IS_SMALLINT(x) (((x) & 0x01) == 0x01) #define XP_STX_IS_SMALLINT(x) (((x) & 0x01) == 0x01)
#define XP_STX_TO_SMALLINT(x) ((x) << 1) | 0x01) #define XP_STX_TO_SMALLINT(x) (((x) << 1) | 0x01)
#define XP_STX_FROM_SMALLINT(x) ((x) >> 1) #define XP_STX_FROM_SMALLINT(x) ((x) >> 1)
/* definitions for common objects */ /* definitions for common objects */

View File

@ -1,5 +1,5 @@
/* /*
* $Id: stx.c,v 1.8 2005-05-10 12:00:43 bacon Exp $ * $Id: stx.c,v 1.9 2005-05-10 15:15:57 bacon Exp $
*/ */
#include <xp/stx/stx.h> #include <xp/stx/stx.h>
@ -28,6 +28,7 @@ xp_stx_t* xp_stx_open (xp_stx_t* stx, xp_stx_word_t capacity)
stx->false = XP_STX_FALSE; stx->false = XP_STX_FALSE;
stx->symbol_table = XP_STX_NIL; stx->symbol_table = XP_STX_NIL;
stx->class_symbol = XP_STX_NIL;
stx->class_metaclass = XP_STX_NIL; stx->class_metaclass = XP_STX_NIL;
stx->class_link = XP_STX_NIL; stx->class_link = XP_STX_NIL;
@ -119,6 +120,7 @@ int xp_stx_bootstrap (xp_stx_t* stx)
/* ready to use new_class */ /* ready to use new_class */
stx->symbol_table = symtab; stx->symbol_table = symtab;
stx->class_symbol = class_Symbol;
stx->class_metaclass = class_Metaclass; stx->class_metaclass = class_Metaclass;

View File

@ -1,5 +1,5 @@
/* /*
* $Id: stx.h,v 1.9 2005-05-10 15:12:31 bacon Exp $ * $Id: stx.h,v 1.10 2005-05-10 15:15:57 bacon Exp $
*/ */
#ifndef _XP_STX_STX_H_ #ifndef _XP_STX_STX_H_
@ -71,6 +71,7 @@ struct xp_stx_t
xp_stx_word_t false; xp_stx_word_t false;
xp_stx_word_t symbol_table; xp_stx_word_t symbol_table;
xp_stx_word_t class_symbol;
xp_stx_word_t class_metaclass; xp_stx_word_t class_metaclass;
xp_stx_word_t class_link; xp_stx_word_t class_link;
xp_bool_t __malloced; xp_bool_t __malloced;