diff --git a/harbour/ChangeLog.txt b/harbour/ChangeLog.txt index eaf5dd3686..0da6d29319 100644 --- a/harbour/ChangeLog.txt +++ b/harbour/ChangeLog.txt @@ -10,6 +10,67 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-01-10 23:25 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * harbour/include/hbapicls.h + * harbour/src/vm/classes.c + + added new internal C function: + void hb_objCloneTo( PHB_ITEM pDest, PHB_ITEM pSource, + PHB_NESTED_CLONED pClonedList ); + it copies object or clone it if class overloaded clone operation. + ; TODO: add support for user defined class clone operation + + * harbour/include/hbapiitm.h + * harbour/src/vm/itemapi.c + * changed returned type of hb_itemCloneTo() to void + + * harbour/src/vm/itemapi.c + * use hb_objCloneTo() in hb_itemClone*() functions. + + * harbour/src/vm/arrays.c + * use hb_objCloneTo() in array/hash clone code. + + * harbour/src/vm/arrayshb.c + ! fixed return values in AEVAL() and ACOPY() when array + is passed by reference. + + * harbour/src/rtl/tclass.prg + * harbour/src/vm/classes.c + * declare :SUPER and :__SUPER messages as non virtual ones. + Now ::SUPER and ::__SUPER messages executed in object method + returns casting to 1-st super object of the class in which + executed method was defined. + + * harbour/include/hbclass.ch + * removed xtranslations for SUPER(): - this workaround for + missing non virtual messages in some Clipper OOP implementations + was breaking valid code which tried to use real :SUPER message + and made SUPER reserved word, i.e. it was not possible to create + code like: + LOCAL super := ::parent2 + ? super:v1, super:v2 + Now this hack is not longer necessary and :SUPER is non virtual + massage in Harbour. + INCOMPATIBLE: If someone has some code like: + SUPER():MSG() + SUPER( PARENT ):MSG() + then please change it to: + ::SUPER:MSG() + ::PARENT:MSG() + + * harbour/contrib/hbmysql/tmysql.prg + * harbour/contrib/hbmysql/tsqlbrw.prg + ! fixed to use ::super() instead of super() + + * harbour/src/rdd/usrrdd/rdds/arrayrdd.prg + + added GOCOLD() method - this method is necessary for WAs + passed to HB_DBDETACH() + + * harbour/doc/xhb-diff.txt + * small update + + * harbour/contrib/*/*.hbx + * regenerated + 2013-01-10 16:21 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/hbmysql/tmysql.prg ! commented code converted to #if 0 block diff --git a/harbour/contrib/gtalleg/gtalleg.hbx b/harbour/contrib/gtalleg/gtalleg.hbx index a21f5bec5a..c0f9802c16 100644 --- a/harbour/contrib/gtalleg/gtalleg.hbx +++ b/harbour/contrib/gtalleg/gtalleg.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/gtwvg/gtwvg.hbx b/harbour/contrib/gtwvg/gtwvg.hbx index 65228ed720..308c0f21ea 100644 --- a/harbour/contrib/gtwvg/gtwvg.hbx +++ b/harbour/contrib/gtwvg/gtwvg.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbamf/hbamf.hbx b/harbour/contrib/hbamf/hbamf.hbx index b20b95cfde..a45045e58d 100644 --- a/harbour/contrib/hbamf/hbamf.hbx +++ b/harbour/contrib/hbamf/hbamf.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbblat/hbblat.hbx b/harbour/contrib/hbblat/hbblat.hbx index 528f499166..2edc4be14b 100644 --- a/harbour/contrib/hbblat/hbblat.hbx +++ b/harbour/contrib/hbblat/hbblat.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbblink/hbblink.hbx b/harbour/contrib/hbblink/hbblink.hbx index 1af8d3d3dd..5af22d338e 100644 --- a/harbour/contrib/hbblink/hbblink.hbx +++ b/harbour/contrib/hbblink/hbblink.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbbz2/hbbz2.hbx b/harbour/contrib/hbbz2/hbbz2.hbx index 783589a385..d11cbebcb4 100644 --- a/harbour/contrib/hbbz2/hbbz2.hbx +++ b/harbour/contrib/hbbz2/hbbz2.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbcairo/hbcairo.hbx b/harbour/contrib/hbcairo/hbcairo.hbx index 1dbcddc841..6f8323f6eb 100644 --- a/harbour/contrib/hbcairo/hbcairo.hbx +++ b/harbour/contrib/hbcairo/hbcairo.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbcomm/hbcomm.hbx b/harbour/contrib/hbcomm/hbcomm.hbx index ef01833141..11d2e5f04a 100644 --- a/harbour/contrib/hbcomm/hbcomm.hbx +++ b/harbour/contrib/hbcomm/hbcomm.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbct/hbct.hbx b/harbour/contrib/hbct/hbct.hbx index 87808cd5fb..fbe9dd6073 100644 --- a/harbour/contrib/hbct/hbct.hbx +++ b/harbour/contrib/hbct/hbct.hbx @@ -8,7 +8,7 @@ // HB_FUNC_EXCLUDE HB_GT_* /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbcups/hbcups.hbx b/harbour/contrib/hbcups/hbcups.hbx index ff2111f53e..4572a6e73f 100644 --- a/harbour/contrib/hbcups/hbcups.hbx +++ b/harbour/contrib/hbcups/hbcups.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbcurl/hbcurl.hbx b/harbour/contrib/hbcurl/hbcurl.hbx index d348eea6f7..68125a6ebe 100644 --- a/harbour/contrib/hbcurl/hbcurl.hbx +++ b/harbour/contrib/hbcurl/hbcurl.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbexpat/hbexpat.hbx b/harbour/contrib/hbexpat/hbexpat.hbx index 5ae4c6b6d5..8e11a84305 100644 --- a/harbour/contrib/hbexpat/hbexpat.hbx +++ b/harbour/contrib/hbexpat/hbexpat.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbfbird/hbfbird.hbx b/harbour/contrib/hbfbird/hbfbird.hbx index b1ea45fef1..1b9a912fc8 100644 --- a/harbour/contrib/hbfbird/hbfbird.hbx +++ b/harbour/contrib/hbfbird/hbfbird.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbfimage/hbfimage.hbx b/harbour/contrib/hbfimage/hbfimage.hbx index 3304284866..0c39dbf967 100644 --- a/harbour/contrib/hbfimage/hbfimage.hbx +++ b/harbour/contrib/hbfimage/hbfimage.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbformat/hbformat.hbx b/harbour/contrib/hbformat/hbformat.hbx index 7c6864e196..2081bb84f0 100644 --- a/harbour/contrib/hbformat/hbformat.hbx +++ b/harbour/contrib/hbformat/hbformat.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbfoxpro/hbfoxpro.hbx b/harbour/contrib/hbfoxpro/hbfoxpro.hbx index 8ef67a1ed5..d5f3e0c960 100644 --- a/harbour/contrib/hbfoxpro/hbfoxpro.hbx +++ b/harbour/contrib/hbfoxpro/hbfoxpro.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbfship/hbfship.hbx b/harbour/contrib/hbfship/hbfship.hbx index bce748bc3c..57a90e9e62 100644 --- a/harbour/contrib/hbfship/hbfship.hbx +++ b/harbour/contrib/hbfship/hbfship.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbgd/hbgd.hbx b/harbour/contrib/hbgd/hbgd.hbx index e7cbd788d1..131e3c670c 100644 --- a/harbour/contrib/hbgd/hbgd.hbx +++ b/harbour/contrib/hbgd/hbgd.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbgs/hbgs.hbx b/harbour/contrib/hbgs/hbgs.hbx index b5c32ed50f..16d7eaeda2 100644 --- a/harbour/contrib/hbgs/hbgs.hbx +++ b/harbour/contrib/hbgs/hbgs.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbgt/hbgt.hbx b/harbour/contrib/hbgt/hbgt.hbx index 8472331d4a..fa38558f9b 100644 --- a/harbour/contrib/hbgt/hbgt.hbx +++ b/harbour/contrib/hbgt/hbgt.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbhpdf/hbhpdf.hbx b/harbour/contrib/hbhpdf/hbhpdf.hbx index 8d0d8c1b84..5949ed7199 100644 --- a/harbour/contrib/hbhpdf/hbhpdf.hbx +++ b/harbour/contrib/hbhpdf/hbhpdf.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbhttpd/hbhttpd.hbx b/harbour/contrib/hbhttpd/hbhttpd.hbx index 3379631783..02d6dcda31 100644 --- a/harbour/contrib/hbhttpd/hbhttpd.hbx +++ b/harbour/contrib/hbhttpd/hbhttpd.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hblzf/hblzf.hbx b/harbour/contrib/hblzf/hblzf.hbx index 53a32a88c4..13453aec04 100644 --- a/harbour/contrib/hblzf/hblzf.hbx +++ b/harbour/contrib/hblzf/hblzf.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbmagic/hbmagic.hbx b/harbour/contrib/hbmagic/hbmagic.hbx index 962b9ec0cb..ea3fd5149e 100644 --- a/harbour/contrib/hbmagic/hbmagic.hbx +++ b/harbour/contrib/hbmagic/hbmagic.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbmemio/hbmemio.hbx b/harbour/contrib/hbmemio/hbmemio.hbx index 85a9e4bc25..ca76fe2939 100644 --- a/harbour/contrib/hbmemio/hbmemio.hbx +++ b/harbour/contrib/hbmemio/hbmemio.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbmisc/hbmisc.hbx b/harbour/contrib/hbmisc/hbmisc.hbx index d5eeeaa315..e52a9a4864 100644 --- a/harbour/contrib/hbmisc/hbmisc.hbx +++ b/harbour/contrib/hbmisc/hbmisc.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbmlzo/hbmlzo.hbx b/harbour/contrib/hbmlzo/hbmlzo.hbx index fac2de09e5..a89f20a72b 100644 --- a/harbour/contrib/hbmlzo/hbmlzo.hbx +++ b/harbour/contrib/hbmlzo/hbmlzo.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbmxml/hbmxml.hbx b/harbour/contrib/hbmxml/hbmxml.hbx index b11aa6a12f..82a65025cb 100644 --- a/harbour/contrib/hbmxml/hbmxml.hbx +++ b/harbour/contrib/hbmxml/hbmxml.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbmysql/hbmysql.hbx b/harbour/contrib/hbmysql/hbmysql.hbx index 391e0e3231..73008a604e 100644 --- a/harbour/contrib/hbmysql/hbmysql.hbx +++ b/harbour/contrib/hbmysql/hbmysql.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbmysql/tmysql.prg b/harbour/contrib/hbmysql/tmysql.prg index 1e66bdca42..e303b49b72 100644 --- a/harbour/contrib/hbmysql/tmysql.prg +++ b/harbour/contrib/hbmysql/tmysql.prg @@ -726,7 +726,7 @@ METHOD New( nSocket, cQuery, cTableName ) CLASS TMySQLTable LOCAL i - super:New( nSocket, AllTrim( cQuery ) ) + ::super:New( nSocket, AllTrim( cQuery ) ) ::cTable := Lower( cTableName ) ::aOldValue := {} @@ -740,7 +740,7 @@ METHOD New( nSocket, cQuery, cTableName ) CLASS TMySQLTable METHOD GetRow( nRow ) CLASS TMySQLTable - LOCAL oRow := super:GetRow( nRow ), i + LOCAL oRow := ::super:GetRow( nRow ), i IF oRow != NIL oRow:cTable := ::cTable @@ -759,7 +759,7 @@ METHOD Skip( nRow ) CLASS TMySQLTable LOCAL i - super:skip( nRow ) + ::super:skip( nRow ) FOR i := 1 TO ::nNumFields ::aOldValue[ i ] := ::FieldGet( i ) diff --git a/harbour/contrib/hbmysql/tsqlbrw.prg b/harbour/contrib/hbmysql/tsqlbrw.prg index 2bd745d78a..fc7a2ec92a 100644 --- a/harbour/contrib/hbmysql/tsqlbrw.prg +++ b/harbour/contrib/hbmysql/tsqlbrw.prg @@ -93,7 +93,7 @@ ENDCLASS METHOD New( cHeading, bBlock, oBrw ) CLASS TBColumnSQL - super:New( cHeading, bBlock ) + ::super:New( cHeading, bBlock ) ::oBrw := oBrw RETURN Self @@ -163,7 +163,7 @@ METHOD New( nTop, nLeft, nBottom, nRight, oServer, oQuery, cTable ) CLASS TBrows HB_SYMBOL_UNUSED( oServer ) HB_SYMBOL_UNUSED( cTable ) - super:New( nTop, nLeft, nBottom, nRight ) + ::super:New( nTop, nLeft, nBottom, nRight ) ::oQuery := oQuery diff --git a/harbour/contrib/hbmzip/hbmzip.hbx b/harbour/contrib/hbmzip/hbmzip.hbx index f623d7f883..8814dd0a37 100644 --- a/harbour/contrib/hbmzip/hbmzip.hbx +++ b/harbour/contrib/hbmzip/hbmzip.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbnetio/hbnetio.hbx b/harbour/contrib/hbnetio/hbnetio.hbx index e68e4ac506..386bf6a85a 100644 --- a/harbour/contrib/hbnetio/hbnetio.hbx +++ b/harbour/contrib/hbnetio/hbnetio.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbnf/hbnf.hbx b/harbour/contrib/hbnf/hbnf.hbx index 488ef64626..844b392854 100644 --- a/harbour/contrib/hbnf/hbnf.hbx +++ b/harbour/contrib/hbnf/hbnf.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbodbc/hbodbc.hbx b/harbour/contrib/hbodbc/hbodbc.hbx index 13a33d6b05..f9dd693b45 100644 --- a/harbour/contrib/hbodbc/hbodbc.hbx +++ b/harbour/contrib/hbodbc/hbodbc.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hboslib/hboslib.hbx b/harbour/contrib/hboslib/hboslib.hbx index 6b4db66391..a4d723a221 100644 --- a/harbour/contrib/hboslib/hboslib.hbx +++ b/harbour/contrib/hboslib/hboslib.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbpgsql/hbpgsql.hbx b/harbour/contrib/hbpgsql/hbpgsql.hbx index 238cfe81ee..8286c40e6d 100644 --- a/harbour/contrib/hbpgsql/hbpgsql.hbx +++ b/harbour/contrib/hbpgsql/hbpgsql.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbsms/hbsms.hbx b/harbour/contrib/hbsms/hbsms.hbx index 26277776ab..533d50847b 100644 --- a/harbour/contrib/hbsms/hbsms.hbx +++ b/harbour/contrib/hbsms/hbsms.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbsqlit3/hbsqlit3.hbx b/harbour/contrib/hbsqlit3/hbsqlit3.hbx index 12b02bffd3..3d925b2bac 100644 --- a/harbour/contrib/hbsqlit3/hbsqlit3.hbx +++ b/harbour/contrib/hbsqlit3/hbsqlit3.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbssl/hbssl.hbx b/harbour/contrib/hbssl/hbssl.hbx index 1e595c25a7..d1e4e79a98 100644 --- a/harbour/contrib/hbssl/hbssl.hbx +++ b/harbour/contrib/hbssl/hbssl.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbtest/hbtest.hbx b/harbour/contrib/hbtest/hbtest.hbx index 38f4e48ba9..340ba05b60 100644 --- a/harbour/contrib/hbtest/hbtest.hbx +++ b/harbour/contrib/hbtest/hbtest.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbtinymt/hbtinymt.hbx b/harbour/contrib/hbtinymt/hbtinymt.hbx index 94541b32cb..2fbc1a2df3 100644 --- a/harbour/contrib/hbtinymt/hbtinymt.hbx +++ b/harbour/contrib/hbtinymt/hbtinymt.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbtip/hbtip.hbx b/harbour/contrib/hbtip/hbtip.hbx index 1bb157a3fd..fd564c588a 100644 --- a/harbour/contrib/hbtip/hbtip.hbx +++ b/harbour/contrib/hbtip/hbtip.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbtpathy/hbtpathy.hbx b/harbour/contrib/hbtpathy/hbtpathy.hbx index edc30fc68c..08788baded 100644 --- a/harbour/contrib/hbtpathy/hbtpathy.hbx +++ b/harbour/contrib/hbtpathy/hbtpathy.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbunix/hbunix.hbx b/harbour/contrib/hbunix/hbunix.hbx index f6ad9ed2bd..b9ff86f476 100644 --- a/harbour/contrib/hbunix/hbunix.hbx +++ b/harbour/contrib/hbunix/hbunix.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbwin/hbwin.hbx b/harbour/contrib/hbwin/hbwin.hbx index 1f1ecf50ad..59753310ee 100644 --- a/harbour/contrib/hbwin/hbwin.hbx +++ b/harbour/contrib/hbwin/hbwin.hbx @@ -8,7 +8,7 @@ // HB_FUNC_EXCLUDE win_oleServerInit /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbxdiff/hbxdiff.hbx b/harbour/contrib/hbxdiff/hbxdiff.hbx index 321d9c63ad..873ea80fee 100644 --- a/harbour/contrib/hbxdiff/hbxdiff.hbx +++ b/harbour/contrib/hbxdiff/hbxdiff.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbxpp/hbxpp.hbx b/harbour/contrib/hbxpp/hbxpp.hbx index 2afac80a8b..2ed185d3ac 100644 --- a/harbour/contrib/hbxpp/hbxpp.hbx +++ b/harbour/contrib/hbxpp/hbxpp.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbzebra/hbzebra.hbx b/harbour/contrib/hbzebra/hbzebra.hbx index 142e3d758a..24c8098873 100644 --- a/harbour/contrib/hbzebra/hbzebra.hbx +++ b/harbour/contrib/hbzebra/hbzebra.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/hbziparc/hbziparc.hbx b/harbour/contrib/hbziparc/hbziparc.hbx index cef10c1483..116428ffea 100644 --- a/harbour/contrib/hbziparc/hbziparc.hbx +++ b/harbour/contrib/hbziparc/hbziparc.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/rddads/rddads.hbx b/harbour/contrib/rddads/rddads.hbx index 63df5d1ec2..7a6b855248 100644 --- a/harbour/contrib/rddads/rddads.hbx +++ b/harbour/contrib/rddads/rddads.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/rddbm/rddbm.hbx b/harbour/contrib/rddbm/rddbm.hbx index 75f243faba..311fed9eed 100644 --- a/harbour/contrib/rddbm/rddbm.hbx +++ b/harbour/contrib/rddbm/rddbm.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/sddfb/sddfb.hbx b/harbour/contrib/sddfb/sddfb.hbx index a273c48f4d..b768f67532 100644 --- a/harbour/contrib/sddfb/sddfb.hbx +++ b/harbour/contrib/sddfb/sddfb.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/sddmy/sddmy.hbx b/harbour/contrib/sddmy/sddmy.hbx index d415b09bde..4608a5f932 100644 --- a/harbour/contrib/sddmy/sddmy.hbx +++ b/harbour/contrib/sddmy/sddmy.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/sddoci/sddoci.hbx b/harbour/contrib/sddoci/sddoci.hbx index 7c629a56b5..520dcde5d2 100644 --- a/harbour/contrib/sddoci/sddoci.hbx +++ b/harbour/contrib/sddoci/sddoci.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/sddodbc/sddodbc.hbx b/harbour/contrib/sddodbc/sddodbc.hbx index a284aae070..78a7c3ad0f 100644 --- a/harbour/contrib/sddodbc/sddodbc.hbx +++ b/harbour/contrib/sddodbc/sddodbc.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/sddpg/sddpg.hbx b/harbour/contrib/sddpg/sddpg.hbx index f2a8a4a450..11071fd325 100644 --- a/harbour/contrib/sddpg/sddpg.hbx +++ b/harbour/contrib/sddpg/sddpg.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/sddsqlt3/sddsqlt3.hbx b/harbour/contrib/sddsqlt3/sddsqlt3.hbx index 8b446503bb..eb698afce1 100644 --- a/harbour/contrib/sddsqlt3/sddsqlt3.hbx +++ b/harbour/contrib/sddsqlt3/sddsqlt3.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/contrib/xhb/xhb.hbx b/harbour/contrib/xhb/xhb.hbx index 5190f1ac09..94d6f43dbe 100644 --- a/harbour/contrib/xhb/xhb.hbx +++ b/harbour/contrib/xhb/xhb.hbx @@ -6,7 +6,7 @@ */ /* -------------------------------------------------------------------- - * WARNING: Automatically generated code below. DO NOT EDIT! + * WARNING: Automatically generated code below. DO NOT EDIT! (except casing) * Regenerate using hbmk2 '-hbx=' option. */ diff --git a/harbour/doc/xhb-diff.txt b/harbour/doc/xhb-diff.txt index 264d2428ed..c27df3a816 100644 --- a/harbour/doc/xhb-diff.txt +++ b/harbour/doc/xhb-diff.txt @@ -2084,15 +2084,19 @@ In xHarbour by default work areas are global to the application and there is no protection mechanism against concurrent access so if two threads try to access the same work area in the same time they can corrupt internal RDD data. It means that for safe concurrent WA access in xHarbour user have -to create his own protection mechanism (some different version of LOCAL -WORKAREA / UNLOCK WORKAREA commands using some other synchronization -methods available in xHarbour, i.e. mutexes). +to create his own protection mechanism (different version of LOCK WORKAREA/ +UNLOCK WORKAREA commands using some other synchronization methods available +in xHarbour, i.e. mutexes). Later support for thread local work areas was added to xHarbour but -without any mechanism which allows to move work area from one thread to -another. This can be controlled by global SET (SETs are global in xHarbour) - _SET_WORKAREAS_SHARED -Setting it to .T. disables global work areas and switches to thread local -ones. +without any mechanism which allows to move work area from one thread +to another. This can be controlled by global SET: + SET( _SET_WORKAREAS_SHARED, ) +or commands: + SET WORKAREAS SHARED => SET( _SET_WORKAREAS_SHARED, .T. ) + SET WORKAREAS PRIVATE => SET( _SET_WORKAREAS_SHARED, .F. ) +(SETs are global not thread local in xHarbour MT model) +Setting _SET_WORKAREAS_SHARED to .F. disables global work areas and +switches to thread local ones. There is no technical or mathematical reason to keep such strange implementation because it does not give any new functionality to programmer in comparison to xBase++ and Harbour but allows to easy diff --git a/harbour/include/hbapicls.h b/harbour/include/hbapicls.h index 805d1b21d8..9f3271d223 100644 --- a/harbour/include/hbapicls.h +++ b/harbour/include/hbapicls.h @@ -102,6 +102,7 @@ extern HB_BOOL hb_objGetVarRef( PHB_ITEM pObject, PHB_SYMB pMessage, PHB_STAC extern HB_BOOL hb_objHasOperator( PHB_ITEM pObject, HB_USHORT uiOperator ); extern HB_BOOL hb_objOperatorCall( HB_USHORT uiOperator, PHB_ITEM pResult, PHB_ITEM pObject, PHB_ITEM pMsgArg1, PHB_ITEM pMsgArg2 ); extern void hb_objDestructorCall( PHB_ITEM pObject ); +extern void hb_objCloneTo( PHB_ITEM pDest, PHB_ITEM pSource, PHB_NESTED_CLONED pClonedList ); #ifndef HB_NO_PROFILER /* profiler for object management */ diff --git a/harbour/include/hbapiitm.h b/harbour/include/hbapiitm.h index d7649ef67f..a4e677a3ac 100644 --- a/harbour/include/hbapiitm.h +++ b/harbour/include/hbapiitm.h @@ -174,7 +174,7 @@ extern HB_EXPORT PHB_ITEM hb_itemUnShareString( PHB_ITEM pItem ); /* un-shar extern HB_EXPORT PHB_ITEM hb_itemReSizeString( PHB_ITEM pItem, HB_SIZE nSize ); /* Resize string buffer of given string item - the pItem have to be valid unrefed string item */ extern HB_EXPORT HB_BOOL hb_itemGetWriteCL( PHB_ITEM pItem, char ** pszValue, HB_SIZE * pnLen ); extern HB_EXPORT PHB_ITEM hb_itemClone ( PHB_ITEM pItem ); /* clone the given item */ -extern HB_EXPORT PHB_ITEM hb_itemCloneTo ( PHB_ITEM pDest, PHB_ITEM pSource ); /* clone the given item */ +extern HB_EXPORT void hb_itemCloneTo ( PHB_ITEM pDest, PHB_ITEM pSource ); /* clone the given item */ extern HB_EXPORT char * hb_itemStr ( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec ); /* convert a number to a string */ extern HB_EXPORT char * hb_itemString ( PHB_ITEM pItem, HB_SIZE * nLen, HB_BOOL * bFreeReq ); /* Convert any scalar to a string */ extern HB_EXPORT HB_BOOL hb_itemStrBuf ( char *szResult, PHB_ITEM pNumber, int iSize, int iDec ); /* convert a number to a string */ diff --git a/harbour/include/hbclass.ch b/harbour/include/hbclass.ch index 7363f2d942..f2ebd3fc91 100644 --- a/harbour/include/hbclass.ch +++ b/harbour/include/hbclass.ch @@ -216,7 +216,7 @@ DECLARE HBClass ; ::realclass:([ ]) /* Indirect super casting translation */ -#xtranslate :Super( ): => :: +#xtranslate :Super( ): => :: #xtranslate __HB_CLS_OPT(,) => @@ -260,12 +260,7 @@ DECLARE HBClass ; nScope := HB_OO_CLSTP_EXPORTED ; HB_SYMBOL_UNUSED( nScope ) ;; oClass := iif( <.metaClass.>, <(metaClass)>, HBClass():new( <(ClassName)>, __HB_CLS_PAR( [ @() ] [ , @() ] ), @__HB_CLS_OPT([__HB_CLS_ASID(),] )() [, <.modulfriend.> ] ) ) ;; #undef _CLASS_NAME_ ; #define _CLASS_NAME_ ;; - #undef _CLASS_MODE_ ; #define _CLASS_MODE_ _CLASS_DECLARATION_ ; - [ ; #translate Super( ): => ::: ] ; - [ ; #translate Super( ): => ::: ] ; - [ ; #translate Super(): => ::: ] ; - [ ; #translate Super: => ::: ] ; - [ ; #translate ::Super : => ::: ] + #undef _CLASS_MODE_ ; #define _CLASS_MODE_ _CLASS_DECLARATION_ #xcommand ENDCLASS [] => ; oClass:Create() ; [<-lck-> __clsLock( oClass:hClass ) ] ;; diff --git a/harbour/src/rdd/usrrdd/rdds/arrayrdd.prg b/harbour/src/rdd/usrrdd/rdds/arrayrdd.prg index 1977cd10c4..45c3fc4971 100644 --- a/harbour/src/rdd/usrrdd/rdds/arrayrdd.prg +++ b/harbour/src/rdd/usrrdd/rdds/arrayrdd.prg @@ -1109,6 +1109,12 @@ STATIC FUNCTION AR_ZAP( nWA ) RETURN HB_SUCCESS +STATIC FUNCTION AR_GOCOLD( nWA ) + + HB_SYMBOL_UNUSED( nWA ) + + RETURN HB_SUCCESS + STATIC FUNCTION AR_FOUND( nWa, lFound ) HB_TRACE( HB_TR_DEBUG, hb_StrFormat( "nWA = %1$d, lFound = %2$s", nWa, hb_ValToExp( lFound ) ) ) @@ -1473,6 +1479,7 @@ FUNCTION ARRAYRDD_GETFUNCTABLE( pFuncCount, pFuncTable, pSuperTable, nRddID, pSu aMyFunc[ UR_PUTVALUE ] := ( @AR_PUTVALUE() ) aMyFunc[ UR_PACK ] := ( @AR_PACK() ) aMyFunc[ UR_ZAP ] := ( @AR_ZAP() ) + aMyFunc[ UR_GOCOLD ] := ( @AR_GOCOLD() ) aMyFunc[ UR_FOUND ] := ( @AR_FOUND() ) aMyFunc[ UR_SEEK ] := ( @AR_SEEK() ) aMyFunc[ UR_INFO ] := ( @AR_INFO() ) diff --git a/harbour/src/rtl/tclass.prg b/harbour/src/rtl/tclass.prg index a61ec565a2..fc51236fa5 100644 --- a/harbour/src/rtl/tclass.prg +++ b/harbour/src/rtl/tclass.prg @@ -233,8 +233,8 @@ STATIC PROCEDURE Create( /* MetaClass */ ) IF ! Empty( ahSuper ) IF ahSuper[ 1 ] != 0 - __clsAddMsg( hClass, "SUPER" , 0, HB_OO_MSG_SUPER, ahSuper[ 1 ], HB_OO_CLSTP_EXPORTED ) - __clsAddMsg( hClass, "__SUPER", 0, HB_OO_MSG_SUPER, ahSuper[ 1 ], HB_OO_CLSTP_EXPORTED ) + __clsAddMsg( hClass, "SUPER" , 0, HB_OO_MSG_SUPER, ahSuper[ 1 ], HB_OO_CLSTP_EXPORTED + HB_OO_CLSTP_NONVIRTUAL ) + __clsAddMsg( hClass, "__SUPER", 0, HB_OO_MSG_SUPER, ahSuper[ 1 ], HB_OO_CLSTP_EXPORTED + HB_OO_CLSTP_NONVIRTUAL ) ENDIF ENDIF __clsAddMsg( hClass, "REALCLASS", 0, HB_OO_MSG_REALCLASS, 0, HB_OO_CLSTP_EXPORTED ) diff --git a/harbour/src/vm/arrays.c b/harbour/src/vm/arrays.c index 0add14f995..615effd981 100644 --- a/harbour/src/vm/arrays.c +++ b/harbour/src/vm/arrays.c @@ -1465,7 +1465,7 @@ static void hb_arrayCloneBody( PHB_BASEARRAY pSrcBaseArray, PHB_BASEARRAY pDstBa void hb_cloneNested( PHB_ITEM pDstItem, PHB_ITEM pSrcItem, PHB_NESTED_CLONED pClonedList ) { /* Clipper clones nested array ONLY if NOT an Object!!! */ - if( HB_IS_ARRAY( pSrcItem ) && pSrcItem->item.asArray.value->uiClass == 0 ) + if( HB_IS_ARRAY( pSrcItem ) ) { PHB_NESTED_CLONED pCloned = pClonedList; PHB_BASEARRAY pBaseArray = pSrcItem->item.asArray.value; @@ -1480,6 +1480,8 @@ void hb_cloneNested( PHB_ITEM pDstItem, PHB_ITEM pSrcItem, PHB_NESTED_CLONED pCl if( pCloned ) hb_itemCopy( pDstItem, pCloned->pDest ); + else if( pSrcItem->item.asArray.value->uiClass != 0 ) + hb_objCloneTo( pDstItem, pSrcItem, pClonedList ); else { hb_arrayNew( pDstItem, pBaseArray->nLen ); diff --git a/harbour/src/vm/arrayshb.c b/harbour/src/vm/arrayshb.c index 7c73db7c7e..cc2802d89b 100644 --- a/harbour/src/vm/arrayshb.c +++ b/harbour/src/vm/arrayshb.c @@ -374,7 +374,7 @@ HB_FUNC( AEVAL ) HB_ISNUM( 3 ) ? &nStart : NULL, HB_ISNUM( 4 ) ? &nCount : NULL ); - hb_itemReturn( hb_stackItemFromBase( 1 ) ); /* AEval() returns the array itself */ + hb_itemReturn( pArray ); /* AEval() returns the array itself */ } else hb_errRT_BASE( EG_ARG, 2017, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); @@ -401,7 +401,7 @@ HB_FUNC( ACOPY ) HB_ISNUM( 5 ) ? &nTarget : NULL ); } - hb_itemReturn( hb_stackItemFromBase( 2 ) ); /* ACopy() returns the target array */ + hb_itemReturn( pDstArray ); /* ACopy() returns the target array */ } } diff --git a/harbour/src/vm/classes.c b/harbour/src/vm/classes.c index 3fb41ad6ab..c184912d9a 100644 --- a/harbour/src/vm/classes.c +++ b/harbour/src/vm/classes.c @@ -169,7 +169,7 @@ typedef struct HB_TYPE itemType; /* Type of item in restricted assignment */ HB_USHORT uiSprClass; /* Originalclass'handel (super or current class'handel if not herited). */ /*Added by RAC&JF*/ HB_USHORT uiScope; /* Scoping value */ - HB_USHORT uiData; /* Item position for instance data, class data and shared data (Harbour like, begin from 1) or delegated message index object */ + HB_USHORT uiData; /* Item position for instance data, class data and shared data (Harbour like, begin from 1), supercast class or delegated message index object */ HB_USHORT uiOffset; /* position in pInitData for class datas (from 1) or offset to instance area in inherited instance data and supercast messages (from 0) */ HB_USHORT uiPrevCls; HB_USHORT uiPrevMth; @@ -1431,8 +1431,7 @@ HB_SIZE hb_clsGetVarIndex( HB_USHORT uiClass, PHB_DYNS pVarSym ) if( pFuncSym == &s___msgSync || pFuncSym == &s___msgSyncClass ) pFuncSym = pMethod->pRealSym; - if( pFuncSym->value.pFunPtr == HB_FUNCNAME( msgSetData ) || - pFuncSym->value.pFunPtr == HB_FUNCNAME( msgGetData ) ) + if( pFuncSym == &s___msgSetData || pFuncSym == &s___msgGetData ) return pMethod->uiData + pMethod->uiOffset; } } @@ -2126,7 +2125,7 @@ HB_BOOL hb_objGetVarRef( PHB_ITEM pObject, PHB_SYMB pMessage, if( pExecSym ) { HB_STACK_TLS_PRELOAD - if( pExecSym->value.pFunPtr == HB_FUNCNAME( msgSetData ) ) + if( pExecSym == &s___msgSetData ) { HB_USHORT uiObjClass = pObject->item.asArray.value->uiClass; PCLASS pClass = s_pClasses[ pStack->uiClass ]; @@ -2145,7 +2144,7 @@ HB_BOOL hb_objGetVarRef( PHB_ITEM pObject, PHB_SYMB pMessage, return hb_arrayGetItemRef( pObject, nIndex, hb_stackReturnItem() ); } - else if( pExecSym->value.pFunPtr == HB_FUNCNAME( msgSetClsData ) ) + else if( pExecSym == &s___msgSetClsData ) { PCLASS pClass = s_pClasses[ pStack->uiClass ]; PMETHOD pMethod = pClass->pMethods + pStack->uiMethod; @@ -2153,7 +2152,7 @@ HB_BOOL hb_objGetVarRef( PHB_ITEM pObject, PHB_SYMB pMessage, return hb_arrayGetItemRef( pClass->pClassDatas, pMethod->uiData, hb_stackReturnItem() ); } - else if( pExecSym->value.pFunPtr == HB_FUNCNAME( msgSetShrData ) ) + else if( pExecSym == &s___msgSetShrData ) { PCLASS pClass = s_pClasses[ pStack->uiClass ]; PMETHOD pMethod = pClass->pMethods + pStack->uiMethod; @@ -2161,7 +2160,7 @@ HB_BOOL hb_objGetVarRef( PHB_ITEM pObject, PHB_SYMB pMessage, return hb_arrayGetItemRef( s_pClasses[ pMethod->uiSprClass ]->pSharedDatas, pMethod->uiData, hb_stackReturnItem() ); } - else if( pExecSym->value.pFunPtr == HB_FUNCNAME( msgScopeErr ) ) + else if( pExecSym == &s___msgScopeErr ) { pExecSym->value.pFunPtr(); } @@ -2214,9 +2213,9 @@ static void hb_objSupperDestructorCall( PHB_ITEM pObject, PCLASS pClass ) { if( pMethod->pFuncSym == &s___msgSuper ) { - PCLASS pSupperClass = s_pClasses[ pMethod->uiSprClass ]; + PCLASS pSupperClass = s_pClasses[ pMethod->uiData ]; if( pSupperClass->fHasDestructor && pSupperClass != pClass ) - pcClasses[ pMethod->uiSprClass ] |= 1; + pcClasses[ pMethod->uiData ] |= 1; } else if( pMethod->pMessage == s___msgDestructor.pDynSym ) pcClasses[ pMethod->uiSprClass ] |= 2; @@ -2426,8 +2425,7 @@ PHB_ITEM hb_objGetVarPtr( PHB_ITEM pObject, PHB_DYNS pVarMsg ) if( pFuncSym == &s___msgSync || pFuncSym == &s___msgSyncClass ) pFuncSym = pMethod->pRealSym; - if( pFuncSym->value.pFunPtr == HB_FUNCNAME( msgSetData ) || - pFuncSym->value.pFunPtr == HB_FUNCNAME( msgGetData ) ) + if( pFuncSym == &s___msgSetData || pFuncSym == &s___msgGetData ) { HB_SIZE nIndex = pMethod->uiData + pMethod->uiOffset; if( pObject->item.asArray.value->uiPrevCls ) @@ -2489,6 +2487,18 @@ static PHB_SYMB hb_objGetFuncSym( PHB_ITEM pItem ) return NULL; } +/* clone object if user defined clone method or copy it */ +void hb_objCloneTo( PHB_ITEM pDest, PHB_ITEM pSource, PHB_NESTED_CLONED pClonedList ) +{ + HB_TRACE( HB_TR_DEBUG, ( "hb_objCloneTo(%p,%p,%p)", pDest, pSource, pClonedList ) ); + + HB_SYMBOL_UNUSED( pClonedList ); + + /* TODO: add support for user defined clone operation */ + + hb_itemCopy( pDest, pSource ); +} + /* send message which allows to set execution context for debugger */ void hb_dbg_objSendMessage( int iProcLevel, PHB_ITEM pObject, PHB_ITEM pMessage, int iParamOffset ) { @@ -3035,7 +3045,7 @@ static HB_BOOL hb_clsAddMsg( HB_USHORT uiClass, const char * szMessage, case HB_OO_MSG_SUPER: - pNewMeth->uiSprClass = uiSprClass; /* store the super handel */ + pNewMeth->uiData = uiSprClass; /* store the super handel */ pNewMeth->uiOffset = uiIndex; /* offset to instance area */ pNewMeth->uiScope = uiScope; pNewMeth->pFuncSym = &s___msgSuper; @@ -3297,7 +3307,7 @@ static HB_USHORT hb_clsNew( const char * szClassName, HB_USHORT uiDatas, if( pSprCls->pMethods[ n ].pMessage && pSprCls->pMethods[ n ].pFuncSym == &s___msgSuper ) { - PCLASS pCls = s_pClasses[ pSprCls->pMethods[ n ].uiSprClass ]; + PCLASS pCls = s_pClasses[ pSprCls->pMethods[ n ].uiData ]; pMethod = hb_clsAllocMsg( pNewCls, pSprCls->pMethods[ n ].pMessage ); @@ -3321,7 +3331,8 @@ static HB_USHORT hb_clsNew( const char * szClassName, HB_USHORT uiDatas, { pNewCls->uiMethods++; pMethod->pMessage = pSprCls->pClassSym; - pMethod->uiSprClass = uiSuperCls; + pMethod->uiSprClass = pNewCls->uiClass; + pMethod->uiData = uiSuperCls; pMethod->uiScope = HB_OO_CLSTP_EXPORTED; pMethod->pFuncSym = &s___msgSuper; pMethod->uiOffset = pNewCls->uiDatas; @@ -3445,7 +3456,8 @@ static HB_USHORT hb_clsNew( const char * szClassName, HB_USHORT uiDatas, { pNewCls->uiMethods++; pMethod->pMessage = pNewCls->pClassSym; - pMethod->uiSprClass = s_uiClasses; + pMethod->uiSprClass = pNewCls->uiClass; + pMethod->uiData = s_uiClasses; pMethod->uiScope = HB_OO_CLSTP_EXPORTED; pMethod->pFuncSym = &s___msgSuper; pMethod->uiOffset = pNewCls->uiDatas; @@ -4658,7 +4670,7 @@ HB_FUNC_STATIC( msgSuper ) PHB_STACK_STATE pStack = hb_stackBaseItem()->item.asSymbol.stackstate; hb_clsMakeSuperObject( hb_stackReturnItem(), hb_stackSelfItem(), - s_pClasses[ pStack->uiClass ]->pMethods[ pStack->uiMethod ].uiSprClass ); + s_pClasses[ pStack->uiClass ]->pMethods[ pStack->uiMethod ].uiData ); } /* diff --git a/harbour/src/vm/itemapi.c b/harbour/src/vm/itemapi.c index ca2e6752c5..318d451aa3 100644 --- a/harbour/src/vm/itemapi.c +++ b/harbour/src/vm/itemapi.c @@ -2133,27 +2133,38 @@ PHB_ITEM hb_itemClone( PHB_ITEM pItem ) HB_TRACE( HB_TR_DEBUG, ( "hb_itemClone(%p)", pItem ) ); if( HB_IS_ARRAY( pItem ) ) - return hb_arrayClone( pItem ); + { + if( HB_IS_OBJECT( pItem ) ) + { + PHB_ITEM pResult = hb_itemNew( NULL ); + hb_objCloneTo( pResult, pItem, NULL ); + return pResult; + } + else + return hb_arrayClone( pItem ); + } else if( HB_IS_HASH( pItem ) ) return hb_hashClone( pItem ); - else return hb_itemNew( pItem ); } -PHB_ITEM hb_itemCloneTo( PHB_ITEM pDest, PHB_ITEM pSource ) +void hb_itemCloneTo( PHB_ITEM pDest, PHB_ITEM pSource ) { HB_TRACE( HB_TR_DEBUG, ( "hb_itemCloneTo(%p,%p)", pDest, pSource ) ); if( HB_IS_ARRAY( pSource ) ) - return hb_arrayCloneTo( pDest, pSource ); - + { + if( HB_IS_OBJECT( pSource ) ) + hb_objCloneTo( pDest, pSource, NULL ); + else + hb_arrayCloneTo( pDest, pSource ); + } else if( HB_IS_HASH( pSource ) ) - return hb_hashCloneTo( pDest, pSource ); - - hb_itemCopy( pDest, pSource ); - return pDest; + hb_hashCloneTo( pDest, pSource ); + else + hb_itemCopy( pDest, pSource ); }