* *
* partial sync with the 3.4 fork codebase. These are the things
synces for the most part:
- copyright headers
- grammar/typos in comments and some readmes
- comment/whitespace/decorations
- variable scoping in C files
- DO CASE/SWITCH and some other alternate syntax usage
- minimal amount of human readable text in strings
- minor code updates
- HB_TRACE() void * casts for pointers and few other changes to
avoid C compiler warnings
- various other, minor code cleanups
- only Harbour/C code/headers were touched in src, utils, contrib,
include. No 3rd party code, no make files, and with just a few
exceptions, no 'tests' code was touched.
- certain components were not touched were 3.4 diverged too much
already, like f.e. hbmk2, hbssl, hbcurl, hbexpat
- the goal was that no actual program logic should be altered by
these changes. Except some possible minor exceptions, any such
change is probably a bug in this patch.
It's a massive patch, if you find anything broken after it, please
open an Issue with the details. Build test was done on macOS.
The goal is make it easier to see what actual code/logic was changed
in 3.4 compared to 3.2 and to make patches easier to apply in both
ways.
* *
% remove brandings and homepage [1] from copyright header. Pass 1 - using script.
[1] nobody has access to it anymore AFAIK - and it's also just
a redirect since long
! update url in copyright header
; this should make the diff between 3.4 and 3.2 easier to manage
* include/hbserial.ch
* src/rtl/itemseri.c
+ added HB_SERIALIZE_IGNOREREF flag.
This flag fully disables logic used to detect multireferences to the
same complex (sub)items like arrays or hashes. It increses the speed
of serialization but serialized data does not contain any information
about refences, i.e. aVal[ 1 ] and aVal[ 2 ] in code below:
aSub := { 1, 2, 3 }
aVal := { aSub, aSub }
are serialized as separated arrays. Additionally items with cyclic
references like:
aSub[ 2 ] := aSub
cannot be serialized at all with HB_SERIALIZE_IGNOREREF flag because
it will create infinite serialization loop and crash with out of
memory message.
* src/rtl/itemseri.c
% rewritten algorithm used to detect cyclic and multi references in
serialized items. The original algorithm has very high overhead when
huge arrays were serialized, i.e. serialization of array with 1'000'000
of subarrays needed about 30 minutes on my i5@3.30GHz. Now it needs
less then a second and this time is only a little bit bigger then
used by serialization with HB_SERIALIZE_IGNOREREF flag.
This modification improve performance also in other code using Harbour
serialization mechanism like I18N files, HBNETIO, GTNET, ... when large
arrays or hashes are saved or transmitted.
* include/hbapi.h
* include/hbapicls.h
* src/vm/arrays.c
* src/vm/classes.c
* src/vm/hashes.c
* src/vm/itemapi.c
* replaced algorithm used to detect cyclic and multi references in
array and hash clone operations with new one similar to current
item serial code. The speed improvement for very large arrays is
the same as in case of serialization code.
* src/rtl/gtsln/mousesln.c
! typo in while loop - synced with Viktor's branch
* include/hbapicdp.h
* include/hbapiitm.h
* src/rtl/itemseri.c
* changed 2-nd parameter in hb_itemSerialize() and hb_itemSerializeCP()
from HB_BOOL fNumSize parameter to int iFlags.
Previous fNumSize is replaced by HB_SERIALIZE_NUMSIZE flag.
Warning: declaration is not backward compatible though existing code
using these functions is binary compatible so it will work
without recompilation.
+ added support for optional compression of serialized values.
It can be enabled in C code by HB_SERIALIZE_COMPRESS flag.
+ added support for serialization flags passed in 2-nd parameter to
hb_Serialize() PRG function.
; Info: support for compression and decompression exists only in
programs which are linked with ZLIB library. Programmers
which want to use it and so far the haven't used ZLIB functions
should add to their code REQUEST HB_ZCOMPRESS
* include/Makefile
+ include/hbserial.ch
+ added header file with Harbour serialization flags.
Now the following flags are supported:
HB_SERIALIZE_NUMSIZE
HB_SERIALIZE_COMPRESS
I'll add support for HB_SERIALIZE_OBJECTSTRUCT soon.
* src/rtl/hbi18n1.c
* contrib/hbnetio/netiocli.c
* contrib/hbnetio/netiosrv.c
* updated to use new Harbour serialization flags.