From df1367fdf031fe024d2afd1f032aa1ac11dfa9c5 Mon Sep 17 00:00:00 2001 From: "Alexander S.Kresin" Date: Wed, 8 Oct 2003 10:22:10 +0000 Subject: [PATCH] 2003-10-08 14:24 UTC+0300 Alexander Kresin --- harbour/ChangeLog | 9 +++++++++ harbour/Makefile | 2 +- harbour/contrib/Makefile | 4 ++++ harbour/source/vm/classes.c | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index d03071ad0c..6b9a6655c9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,15 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-10-08 14:24 UTC+0300 Alexander Kresin + * Makefile + * contrib/Makefile + * Makefiles are changed to build some contribution libraries. + * source/vm/classes.c + * hb_objSendMsg() function added ( borrowed from xHarbour ). + It makes it more easy to set/get values of object variables, + execute object methods from the C level. + 2003-10-07 12:06 UTC+0200 Chen Kedem * doc/whatsnew.txt * Update build 43 release date diff --git a/harbour/Makefile b/harbour/Makefile index 40672b7003..4e18027acc 100644 --- a/harbour/Makefile +++ b/harbour/Makefile @@ -9,7 +9,7 @@ DIRS=\ include \ source \ utils \ -# tests \ + contrib \ # samples \ include $(ROOT)config/dir.cf diff --git a/harbour/contrib/Makefile b/harbour/contrib/Makefile index 5d0fc2630c..e624459ee0 100644 --- a/harbour/contrib/Makefile +++ b/harbour/contrib/Makefile @@ -26,6 +26,8 @@ DIRS=\ libmisc \ libnf \ rdd_ads \ + ole \ + odbc \ samples \ endif @@ -62,6 +64,8 @@ DIRS=\ libct \ libgt \ libmisc \ + rdd_ads \ + odbc \ samples \ endif diff --git a/harbour/source/vm/classes.c b/harbour/source/vm/classes.c index df26f6d108..25e3679d2e 100644 --- a/harbour/source/vm/classes.c +++ b/harbour/source/vm/classes.c @@ -1824,6 +1824,38 @@ HB_FUNC( __OBJCLONE ) } } +void hb_objSendMsg( PHB_ITEM pObj, char *sMsg, ULONG ulArg, ... ) +{ + PHB_DYNS pMsgSym = hb_dynsymFindName( sMsg ); + + if( pMsgSym ) + { + hb_vmPushSymbol( pMsgSym->pSymbol ); + hb_vmPush( pObj ); + + if( ulArg ) + { + unsigned long i; + + va_list ap; + + va_start( ap, ulArg ); + + for( i = 0; i < ulArg; i++ ) + { + hb_vmPush( va_arg( ap, PHB_ITEM ) ); + } + + va_end( ap ); + } + + hb_vmSend( (USHORT) ulArg ); + } + else + { + hb_errRT_BASE( EG_ARG, 3000, NULL, "__ObjSendMsg()", 0 ); + } +} /* * = __objSendMsg( , ,