2013-05-23 18:16 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* include/hbapi.h
* src/vm/hvm.c
* keep natural internal order in newly created hashes
This commit is contained in:
@@ -10,6 +10,11 @@
|
||||
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
|
||||
*/
|
||||
|
||||
2013-05-23 18:16 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* include/hbapi.h
|
||||
* src/vm/hvm.c
|
||||
* keep natural internal order in newly created hashes
|
||||
|
||||
2013-05-22 14:15 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
|
||||
* contrib/sddpg/core.c
|
||||
! added missing parentheses in last commit
|
||||
@@ -46,7 +51,8 @@
|
||||
|
||||
2013-05-16 17:00 UTC+0200 Jfl mafact (jfl/at/mafact.com)
|
||||
* contrib/rddads/adsfunc.c
|
||||
! Adding 2nd param to function ADSCOPYTABLECONTENT to allow filtering like in ADSCOPYTABLE
|
||||
! Adding 2nd param to function ADSCOPYTABLECONTENT to allow filtering
|
||||
like in ADSCOPYTABLE
|
||||
|
||||
2013-05-15 19:54 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* src/pp/hbpp.c
|
||||
|
||||
@@ -917,7 +917,7 @@ extern HB_EXPORT HB_BOOL hb_hashDelAt( PHB_ITEM pHash, HB_SIZE nPos );
|
||||
#define HB_HASH_KEEPORDER 0x40
|
||||
|
||||
#define HB_HASH_FLAG_MASK 0xFFFF
|
||||
#define HB_HASH_FLAG_DEFAULT ( HB_HASH_AUTOADD_ASSIGN | HB_HASH_BINARY )
|
||||
#define HB_HASH_FLAG_DEFAULT ( HB_HASH_AUTOADD_ASSIGN | HB_HASH_BINARY | HB_HASH_KEEPORDER )
|
||||
|
||||
#define HB_HASH_UNION 0 /* logical OR on items in two hash tables */
|
||||
#define HB_HASH_INTERSECT 1 /* logical AND on items in two hash tables */
|
||||
|
||||
14
src/vm/hvm.c
14
src/vm/hvm.c
@@ -5443,28 +5443,28 @@ static void hb_vmHashGen( HB_SIZE nElements ) /* generates an nElements Hash and
|
||||
{
|
||||
HB_STACK_TLS_PRELOAD
|
||||
PHB_ITEM pHash, pKey, pVal;
|
||||
int iPos;
|
||||
|
||||
HB_TRACE( HB_TR_DEBUG, ( "hb_vmHashGen(%" HB_PFS "u)", nElements ) );
|
||||
|
||||
/* create new hash item */
|
||||
pHash = hb_hashNew( NULL );
|
||||
hb_hashPreallocate( pHash, nElements );
|
||||
while( nElements-- )
|
||||
nElements <<= 1;
|
||||
iPos = - ( int ) nElements;
|
||||
while( iPos )
|
||||
{
|
||||
pKey = hb_stackItemFromTop( -2 );
|
||||
pVal = hb_stackItemFromTop( -1 );
|
||||
pKey = hb_stackItemFromTop( iPos++ );
|
||||
pVal = hb_stackItemFromTop( iPos++ );
|
||||
if( HB_IS_HASHKEY( pKey ) )
|
||||
{
|
||||
hb_hashAddNew( pHash, pKey, pVal );
|
||||
hb_stackPop();
|
||||
hb_stackPop();
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_errRT_BASE( EG_BOUND, 1133, NULL, hb_langDGetErrorDesc( EG_ARRASSIGN ), 3, pHash, pKey, pVal );
|
||||
break;
|
||||
}
|
||||
}
|
||||
hb_stackRemove( hb_stackTopOffset() - nElements );
|
||||
hb_itemMove( hb_stackAllocItem(), pHash );
|
||||
hb_itemRelease( pHash );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user