From cec63780c5e635fbb49b6968b5740a72ddfdf39e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 24 Jul 2000 22:54:45 +0000 Subject: [PATCH] 2000-07-25 00:53 UTC+0100 Victor Szakats --- harbour/ChangeLog | 5 +++++ harbour/source/vm/itemapi.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9eba5a9f2e..e253550463 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2000-07-25 00:53 UTC+0100 Victor Szakats + + * source/vm/itemapi.c + + Some NOTEs added to the Eval API functions. + 2000-07-25 00:33 UTC+0100 Victor Szakats * source/rtl/setkey.c diff --git a/harbour/source/vm/itemapi.c b/harbour/source/vm/itemapi.c index 68764c294a..ac3a35fe68 100644 --- a/harbour/source/vm/itemapi.c +++ b/harbour/source/vm/itemapi.c @@ -98,6 +98,16 @@ BOOL hb_evalNew( PEVALINFO pEvalInfo, PHB_ITEM pItem ) /* NOTE: CA-Cl*pper is buggy and will not check if more parameters are added than the maximum (9). [vszakats] */ +/* NOTE: CA-Cl*pper NG suggest that the Items passed as parameters should/may + be released by the programmer explicitly. But in fact hb_evalRelease() + will automatically release all of them. The sample programs in the + NG are doing it that way. Releasing the parameters explicitly in + Harbour will cause an internal error, while it will be silently + ignored (?) in CA-Cl*pper. This is due to the different internal + handling of the Items, but IIRC it causes leak in CA-Clipper. All in + all, don't release the eval parameter Items explicitly to make both + Harbour and CA-Clipper happy. [vszakats] */ + BOOL hb_evalPutParam( PEVALINFO pEvalInfo, PHB_ITEM pItem ) { HB_TRACE(HB_TR_DEBUG, ("hb_evalPutParam(%p, %p)", pEvalInfo, pItem)); @@ -153,6 +163,10 @@ PHB_ITEM hb_evalLaunch( PEVALINFO pEvalInfo ) return pResult; } +/* NOTE: CA-Clipper NG states that hb_evalLaunch() must be called at least + once and only once before calling hb_evalRelease(). Harbour doesn't + have these requirements. [vszakats] */ + BOOL hb_evalRelease( PEVALINFO pEvalInfo ) { HB_TRACE(HB_TR_DEBUG, ("hb_evalRelease(%p)", pEvalInfo));