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( <nClassH>, <cMsg> | <sMsg> ) -> <nType>
      <nType> is one of HB_OO_MSG_* values defined in hboo.ch or -1 if
      message is not supported.
This commit is contained in:
Przemyslaw Czerpak
2010-02-21 12:49:05 +00:00
parent 0e173b1108
commit 0c88b47383
3 changed files with 43 additions and 3 deletions

View File

@@ -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( <nClassH>, <cMsg> | <sMsg> ) -> <nType>
<nType> 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

View File

@@ -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 )

View File

@@ -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( <hClass>, <cMsgName> | <sMsgName> ) -> <nType>
*
* return type of method attached to given message,
* <nType> 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