diff --git a/harbour/ChangeLog b/harbour/ChangeLog index af53a720b4..1385488d3d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,19 @@ +2000-10-03 231:45 UTC+0100 JFL + * source/compiler/hbpcode.c + * uprated kolpas limit counter from 3 to 20 + to allow more neested #command to be matched + * include/hbclass.ch + * Added two compatibility #define allowing somebody to + disable either the autoInherit of tObject (HB_CLS_NOTOBJECT) + or to not auto initiate logical and Numerical var by default + (HB_CLS_NOAUTOINIT) + * source/rtl/tclass.prg + * Added optional param to addmultidata and aadmulticlsdata + to control the autoinit (see previous addons) + * source/vm/classes.c + * Scoping error when scoped var where used from inline + + 2000-10-02 13:00 UTC+0800 Ron Pinkas * source/compiler/hbpcode.c * Corrected 1 compiler warning. diff --git a/harbour/include/hbclass.ch b/harbour/include/hbclass.ch index b552c2ee66..1e438a8fdd 100644 --- a/harbour/include/hbclass.ch +++ b/harbour/include/hbclass.ch @@ -78,6 +78,30 @@ DECLARE TClass ; /* it seem actually impossible to completely separate it without creating */ /* four differents include file (what I would not see in fact ) */ +/* There is also two compatibility define you can use */ +/* HB_CLS_NOTOBJECT wich IF DEFINED, disable the auto inherit of tobject */ +/* (wich in fact also disable the classy compatibility :new(...) => :Init(...) */ +/* HB_CLS_NOAUTOINIT wich disable the (VO like) AutoInit for Logical and Numeric */ +/* when not specifically initiated */ +/* These two are disabled by default */ +/* So Each class _inherit_ of tObject by default and */ +/* Each type logical or numerical is initiated to .F. and 0 by default */ + +/* #define HB_CLS_NOTOBJECT */ /* Should be included in some compatibility include files as needed */ +/* #define HB_CLS_NOAUTOINIT */ /* Idem */ + +#ifdef HB_CLS_NOTOBJECT + #define __HB_CLS_PAR __CLS_PAR00 +#else + #define __HB_CLS_PAR __CLS_PARAM +#endif + +#ifdef HB_CLS_NOAUTOINIT + #define __HB_CLS_NOINI .T. +#else + #define __HB_CLS_NOINI .F. +#endif + #ifndef HB_CLS_FWO #ifndef HB_CLS_CSY #ifndef HB_CLS_VO @@ -109,7 +133,7 @@ DECLARE TClass ; static s_oClass AS CLASS TClass;; local nScope := HB_OO_CLSTP_EXPORTED ;; if s_oClass == NIL ;; - s_oClass := TClass():New( <(ClassName)>, __CLS_PARAM([ <(SuperClass1)> ] [ ,<(SuperClassN)> ] ) ) ;; + s_oClass := TClass():New( <(ClassName)>, __HB_CLS_PAR ([ <(SuperClass1)> ] [ ,<(SuperClassN)> ] ) ) ;; #undef _CLASS_NAME_ ;; #define _CLASS_NAME_ ;; #translate CLSMETH () => @_() ; @@ -127,7 +151,7 @@ DECLARE TClass ; static s_oClass AS CLASS TClass;; local nScope := HB_OO_CLSTP_EXPORTED ;; if s_oClass == NIL ;; - s_oClass := TClass():New( <(ClassName)>, __CLS_PARAM([ <(SuperClass1)> ] [ ,<(SuperClassN)> ] ) ) ;; + s_oClass := TClass():New( <(ClassName)>, __HB_CLS_PAR ([ <(SuperClass1)> ] [ ,<(SuperClassN)> ] ) ) ;; #undef _CLASS_NAME_ ;; #define _CLASS_NAME_ ;; #translate CLSMETH () => @() ; @@ -148,11 +172,11 @@ DECLARE TClass ; #xcommand VAR [ TYPE ] [ ASSIGN ] [] [] [