Revision: 14579
http://harbour-project.svn.sourceforge.net/harbour-project/?rev=14579&view=rev
Author: druzus
Date: 2010-05-25 11:20:34 +0000 (Tue, 25 May 2010)
Log Message:
-----------
2010-05-25 13:20 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbapi.h
* harbour/src/vm/hashes.c
* harbour/src/vm/hashfunc.c
+ added support for keeping strict assign order in hash arrays. It's
enabled optionally by setting HB_HASH_KEEPORDER hash array flag.
It gives the same functionality as associative arrays in xHarbour
(enabled by HSETAACOMPATIBILITY()) but this implementation is
internally completely different. It does not introduce linear
scan in add operation so enabling it should not reduce the
performance in this operation. It can even improve it on some
hardware reducing number of memory bytes which have to be moved.
Only delete operation will force linear index scan. The most
important in this implementation is that it does not need any
additional functions like HAA*() in xHarbour. Just simply all
existing functions operating on position indexes like HB_HPOS(),
HB_HKEYAT(), HB_HVALUEAT(), HB_HPAIRAT(), HB_HDELAT(), HB_HSCAN()
use as index natural order in which items were added to hash array.
Also HB_HKEYS(), HB_HVALUES() and FOR EACH iterations respect it.
+ added new PRG functions
HB_HKEEPORDER( <hValue> [, <lNewSetting> ] ) -> <lPrevSetting>
HB_HSETORDER( <hValue> [, <lNewSetting> ] ) -> <hValue>
which cam be used to enable/disable strict order in hash array.
Enabling strict order for non empty hash arrays accept the order
created after sorting existing item not the original assign order.
Disabling strict order for non empty hash arrays may change the
items order.
; TODO: add translation for xHarbour's HAA*() functions to hbcompat.ch
and/or xhb library.
* harbour/contrib/hbnetio/netiocli.c
* harbour/contrib/hbnetio/netiosrv.c
% reenabled TCP_NODELAY on client and server side
I had to be really tired when I was making tests and I mixed
hb_socketSetNoDelay() with hb_socketSetBlockingIO().
Thanks to Aleksander Czajczynski who noticed the delay in his
tests.
* harbour/contrib/hbwin/olecore.c
* minor cleanup
Modified Paths:
--------------
trunk/harbour/ChangeLog
trunk/harbour/contrib/hbnetio/netiocli.c
trunk/harbour/contrib/hbnetio/netiosrv.c
trunk/harbour/contrib/hbwin/olecore.c
trunk/harbour/include/hbapi.h
trunk/harbour/src/vm/hashes.c
trunk/harbour/src/vm/hashfunc.c
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour