From 340fc44e058099a1ee2cb5ceef897950d2112414 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 20 Jun 2012 11:02:39 +0000 Subject: [PATCH] 2012-06-20 13:02 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/src/rtl/valtype.c * harbour/include/harbour.hbx + added new PRG function HB_ISEVALITEM() It returns true if item can be evaluated by EVAL() function, i.e. for codeblocks and function symbols. In the future it can be extended to accept objects with :EVAL() methods. --- harbour/ChangeLog | 9 +++++++++ harbour/include/harbour.hbx | 1 + harbour/src/rtl/valtype.c | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index da22167944..63e92f2085 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,15 @@ The license applies to all entries newer than 2009-04-28. */ +2012-06-20 13:02 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * harbour/src/rtl/valtype.c + * harbour/include/harbour.hbx + + added new PRG function HB_ISEVALITEM() + It returns true if item can be evaluated by EVAL() function, + i.e. for codeblocks and function symbols. + In the future it can be extended to accept objects with :EVAL() + methods. + 2012-06-20 09:27 UTC+0200 Viktor Szakats (harbour syenar.net) * config/os2/watcom.mk ! same RC fix for os2 diff --git a/harbour/include/harbour.hbx b/harbour/include/harbour.hbx index 356d3c9e50..a503713a62 100644 --- a/harbour/include/harbour.hbx +++ b/harbour/include/harbour.hbx @@ -612,6 +612,7 @@ DYNAMIC HB_ISBLOCK DYNAMIC HB_ISCHAR DYNAMIC HB_ISDATE DYNAMIC HB_ISDATETIME +DYNAMIC HB_ISEVALITEM DYNAMIC hb_IsFunction DYNAMIC HB_ISHASH DYNAMIC HB_ISHASHKEY diff --git a/harbour/src/rtl/valtype.c b/harbour/src/rtl/valtype.c index 93c1a7246e..5828f98479 100644 --- a/harbour/src/rtl/valtype.c +++ b/harbour/src/rtl/valtype.c @@ -151,6 +151,11 @@ HB_FUNC( HB_ISHASHKEY ) hb_retl( ( hb_parinfo( 1 ) & HB_IT_HASHKEY ) != 0 ); } +HB_FUNC( HB_ISEVALITEM ) +{ + hb_retl( ( hb_parinfo( 1 ) & HB_IT_EVALITEM ) != 0 ); +} + HB_FUNC( HB_ISNULL ) { PHB_ITEM pItem = hb_param( 1, HB_IT_ANY );