*** empty log message ***

This commit is contained in:
hyung-hwan 2005-07-30 05:11:39 +00:00
parent 2ad97f6749
commit 97fb43d757
2 changed files with 12 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: macros.h,v 1.29 2005-07-27 11:09:46 bacon Exp $
* $Id: macros.h,v 1.30 2005-07-30 05:11:39 bacon Exp $
*/
#ifndef _XP_MACROS_H_
@ -33,7 +33,12 @@
((XP_TYPE_IS_SIGNED(type)? (type)((type)1 << (xp_sizeof(type) * 8 - 1)): (type)0))
#define XP_NUM_IS_POWOF2(x) (((x) & ((x) - 1)) == 0)
#define XP_SWAP(x,y) ((x) ^= (y) ^= (x) ^= (y))
#define XP_SWAP(x,y,original_type,casting_type) \
do { \
x = (original_type)((casting_type)(x) ^ (casting_type)(y)); \
y = (original_type)((casting_type)(y) ^ (casting_type)(x)); \
x = (original_type)((casting_type)(x) ^ (casting_type)(y)); \
} while (0)
#define XP_ABS(x) ((x) < 0? -(x): (x))
#define XP_LOOP_CONTINUE(id) goto __loop_ ## id ## _begin__;

View File

@ -1,5 +1,5 @@
/*
* $Id: dict.c,v 1.5 2005-07-19 16:09:34 bacon Exp $
* $Id: dict.c,v 1.6 2005-07-30 05:11:39 bacon Exp $
*/
#include <xp/stx/dict.h>
@ -94,8 +94,10 @@ static void __dict_grow (xp_stx_t* stx, xp_word_t dict)
/* TODO: explore if dict can be immediately destroyed.
*/
XP_SWAP ((xp_uint_t)XP_STX_OBJECT(stx,dict),
(xp_uint_t)XP_STX_OBJECT(stx,new));
xp_assert (xp_sizeof(xp_stx_object_t*) == xp_sizeof(xp_uint_t));
XP_SWAP (XP_STX_OBJECT(stx,dict),
XP_STX_OBJECT(stx,new),
xp_stx_object_t*, xp_uint_t);
}
xp_word_t xp_stx_dict_lookup (