diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 588d58afa4..ade704baec 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,19 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-21 13:48 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/ChangeLog + ! fixed typo + + * harbour/src/rtl/hbsocket.c + ! fixed OS2 builds using TCPV40HDRS - please test + + * harbour/src/vm/classes.c + + added new PRG function: + __clsMsgType( , | ) -> + is one of HB_OO_MSG_* values defined in hboo.ch or -1 if + message is not supported. + 2010-02-20 23:11 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rdd/ordwldsk.c * src/rdd/ordcount.c @@ -92,7 +105,7 @@ * harbour/src/lang/msges.c ! added hack for Solaris builds where ES is macro - TODDO: sync names of lang and corresponding code modules. + TODDO: sync names of lang and corresponding codepage modules. * harbour/src/vm/dynlibhb.c * pacified warning diff --git a/harbour/src/rtl/hbsocket.c b/harbour/src/rtl/hbsocket.c index d7d9c74944..61fd461909 100644 --- a/harbour/src/rtl/hbsocket.c +++ b/harbour/src/rtl/hbsocket.c @@ -157,15 +157,16 @@ # endif # define HB_IS_INET_NTOA_MT_SAFE #elif defined( HB_OS_OS2 ) -# define HB_HAS_SOCKADDR_SA_LEN # if defined( __WATCOMC__ ) # define HB_HAS_INET_PTON # define HB_HAS_INET_NTOP +# define HB_HAS_SOCKADDR_SA_LEN # else # if ! defined( TCPV40HDRS ) # define HB_HAS_INET_ATON # define HB_HAS_INET_PTON # define HB_HAS_INET_NTOP +# define HB_HAS_SOCKADDR_SA_LEN # endif # endif #elif defined( HB_OS_DOS ) diff --git a/harbour/src/vm/classes.c b/harbour/src/vm/classes.c index 04133caf91..e626cd691d 100644 --- a/harbour/src/vm/classes.c +++ b/harbour/src/vm/classes.c @@ -4259,7 +4259,7 @@ HB_FUNC_STATIC( msgClassSel ) hb_arrayNew( pItem, 4 ); hb_arraySetC( pItem, HB_OO_DATA_SYMBOL, pMethod->pMessage->pSymbol->szName ); - hb_arraySetNI( pItem, HB_OO_DATA_TYPE, hb_methodType( pMethod) ); + hb_arraySetNI( pItem, HB_OO_DATA_TYPE, hb_methodType( pMethod ) ); hb_arraySetNI( pItem, HB_OO_DATA_SCOPE, pMethod->uiScope ); } else @@ -4909,6 +4909,32 @@ HB_FUNC( __CLSGETPROPERTIES ) hb_itemReturnRelease( pReturn ); } +/* + * __clsMsgType( , | ) -> + * + * return type of method attached to given message, + * is one of HB_OO_MSG_* values defined in hboo.ch or + * -1 if message is not supported. + */ +HB_FUNC( __CLSMSGTYPE ) +{ + PHB_DYNS pMessage = hb_objGetMsgSym( hb_param( 2, HB_IT_ANY ) ); + + if( pMessage ) + { + HB_STACK_TLS_PRELOAD + HB_USHORT uiClass = ( HB_USHORT ) hb_parni( 1 ); + PMETHOD pMethod = NULL; + + if( uiClass && uiClass <= s_uiClasses ) + pMethod = hb_clsFindMsg( s_pClasses[ uiClass ], pMessage ); + + hb_retni( pMethod ? hb_methodType( pMethod ) : -1 ); + } + else + hb_errRT_BASE_SubstR( EG_ARG, 1099, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); +} + /* extend the size of classes buffer to given value to avoid later * RT reallocations. It may be useful in some very seldom cases * for MT programs which will allocate dynamically at runtime