diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 50cd9db6c7..430e1cfc16 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-20 14:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/vm/dlmalloc.c + ! removed hack with overlapped structures with small chunks to not + confuse C compilers which can make strict-aliasing optimizations + + * harbour/src/vm/set.c + ! removed old casting left by mistake in hb_conSetCursor() calls + 2009-11-20 13:56 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/vm/set.c ! USHORT -> HB_ERRCODE. diff --git a/harbour/src/vm/dlmalloc.c b/harbour/src/vm/dlmalloc.c index c6bc678e09..37974f2222 100644 --- a/harbour/src/vm/dlmalloc.c +++ b/harbour/src/vm/dlmalloc.c @@ -2027,7 +2027,7 @@ struct malloc_state { mchunkptr top; size_t trim_check; size_t magic; - mchunkptr smallbins[(NSMALLBINS+1)*2]; + mchunk smallbins[NSMALLBINS]; tbinptr treebins[NTREEBINS]; size_t footprint; size_t max_footprint; @@ -2238,7 +2238,7 @@ static size_t traverse_and_check(mstate m); #define MIN_SMALL_INDEX (small_index(MIN_CHUNK_SIZE)) /* addressing by index. See above about smallbin repositioning */ -#define smallbin_at(M, i) ((sbinptr)((char*)&((M)->smallbins[(i)<<1]))) +#define smallbin_at(M, i) (&((M)->smallbins[(i)])) #define treebin_at(M,i) (&((M)->treebins[i])) /* assign tree index for size S to variable I */ diff --git a/harbour/src/vm/set.c b/harbour/src/vm/set.c index 8329e60e9b..ae6284d486 100644 --- a/harbour/src/vm/set.c +++ b/harbour/src/vm/set.c @@ -577,7 +577,7 @@ HB_FUNC( SET ) break; case HB_SET_CURSOR: if( args >= 2 && HB_IS_NUMERIC( pArg2 ) ) - hb_retni( hb_conSetCursor( TRUE, ( USHORT ) hb_itemGetNI( pArg2 ) ) ); + hb_retni( hb_conSetCursor( TRUE, hb_itemGetNI( pArg2 ) ) ); else hb_retni( hb_conSetCursor( FALSE, 0 ) ); break; @@ -1578,7 +1578,7 @@ BOOL hb_setSetItem( HB_set_enum set_specifier, PHB_ITEM pItem ) case HB_SET_CURSOR: if( HB_IS_NUMERIC( pItem ) ) { - hb_conSetCursor( TRUE, ( USHORT ) hb_itemGetNI( pItem ) ); + hb_conSetCursor( TRUE, hb_itemGetNI( pItem ) ); fResult = TRUE; } break;