From 891690234d419cebf22b814813a80a45a39964ef Mon Sep 17 00:00:00 2001 From: Jean-Francois Lefebvre Date: Sun, 18 Nov 2001 21:20:09 +0000 Subject: [PATCH] 2001-11-18 22:15 GMT+1 JFL (mafact) --- harbour/ChangeLog | 15 ++++ harbour/include/hbclass.ch | 6 ++ harbour/source/vm/classes.c | 94 +++++++++++++++++++++++-- harbour/source/vm/hvm.c | 135 +++++++++++------------------------- harbour/tests/overload.prg | 29 ++++++++ 5 files changed, 179 insertions(+), 100 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d6cb7366b0..e98f292b8e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,18 @@ +2001-11-18 22:15 GMT+1 JFL (mafact) + * harbour/source/vm/classes.c + * change CLSADDMSG() to intercept Operator overloading and + use standardised symbol in place of operator itself + (like "-" => "__OpLess" ) + * harbour/source/vm/hvm.c + * Modif done to send correct message to object as newly defined + * harbour/include/hbclass.ch + + added an OPERATOR command for Inline use now we can define an OPERATOR + using inline only like ; + OPERATOR "-" ARG xARg INLINE ::cValue - xArg + see new test overload.prg + * harbour/tests/overload.prg + adapted to command mode and use of the new OPERATOR INLINE command + 2001-11-17 15:40 GMT+0700 Andi Jahja * source/lang/msgzhbig.c - remove msgzhbig.c as it was replaced by msgzhb5.c diff --git a/harbour/include/hbclass.ch b/harbour/include/hbclass.ch index ff19b4725d..12c2700eef 100644 --- a/harbour/include/hbclass.ch +++ b/harbour/include/hbclass.ch @@ -404,6 +404,12 @@ DECLARE HBClass ; s_oClass:AddInline( <(op)>, {|Self [,] | Self:( [] ) }, HBCLSCHOICE( <.export.>, <.protect.>, <.hidde.> ) ) #endif +#xcommand OPERATOR ARG INLINE [ ] [] [