2009-07-10 21:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* include/hbextern.ch
+ Added HB_SETCLSHANDLE().
* source/vm/evalhb.c
* source/vm/eval.c
* source/vm/dynlibhb.c
! Fixed old int <-> USHORT conversion MSVC warnings.
; TOFIX: ? There is a disagreement between different APIs
and Harbour program parts on the size and type of
number of parameters, it can be int, USHORT, ULONG,
and in some places there is also BYTE limit.
* source/common/hbver.c
* Minor formatting.
This commit is contained in:
@@ -17,6 +17,22 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-07-10 21:21 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/hbextern.ch
|
||||
+ Added HB_SETCLSHANDLE().
|
||||
|
||||
* source/vm/evalhb.c
|
||||
* source/vm/eval.c
|
||||
* source/vm/dynlibhb.c
|
||||
! Fixed old int <-> USHORT conversion MSVC warnings.
|
||||
; TOFIX: ? There is a disagreement between different APIs
|
||||
and Harbour program parts on the size and type of
|
||||
number of parameters, it can be int, USHORT, ULONG,
|
||||
and in some places there is also BYTE limit.
|
||||
|
||||
* source/common/hbver.c
|
||||
* Minor formatting.
|
||||
|
||||
2009-07-10 20:31 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* source/rtl/xhelp.c
|
||||
! Silenced MSVC warning.
|
||||
|
||||
@@ -928,6 +928,7 @@ EXTERNAL HB_MACROBLOCK
|
||||
EXTERNAL HB_MMIDDLEDOWN
|
||||
EXTERNAL HB_STRFORMAT
|
||||
EXTERNAL HB_ALERT
|
||||
EXTERNAL HB_SETCLSHANDLE
|
||||
|
||||
EXTERNAL HB_INISETCOMMENT
|
||||
EXTERNAL HB_INIREAD
|
||||
|
||||
@@ -513,7 +513,7 @@ char * hb_verCompiler( void )
|
||||
|
||||
#elif defined( _MSC_VER )
|
||||
|
||||
#if (_MSC_VER >= 800)
|
||||
#if ( _MSC_VER >= 800 )
|
||||
pszName = "Microsoft Visual C";
|
||||
#else
|
||||
pszName = "Microsoft C";
|
||||
@@ -534,16 +534,16 @@ char * hb_verCompiler( void )
|
||||
|
||||
#elif defined( __BORLANDC__ )
|
||||
|
||||
#if (__BORLANDC__ >= 1424) /* Version 5.9 */
|
||||
#if ( __BORLANDC__ >= 1424 ) /* Version 5.9 */
|
||||
pszName = "CodeGear C++";
|
||||
#else
|
||||
pszName = "Borland C++";
|
||||
#endif
|
||||
#if (__BORLANDC__ == 1040) /* Version 3.1 */
|
||||
#if ( __BORLANDC__ == 1040 ) /* Version 3.1 */
|
||||
iVerMajor = 3;
|
||||
iVerMinor = 1;
|
||||
iVerPatch = 0;
|
||||
#elif (__BORLANDC__ >= 1280) /* Version 5.x */
|
||||
#elif ( __BORLANDC__ >= 1280 ) /* Version 5.x */
|
||||
iVerMajor = __BORLANDC__ >> 8;
|
||||
iVerMinor = ( __BORLANDC__ & 0xFF ) >> 4;
|
||||
iVerPatch = __BORLANDC__ & 0xF;
|
||||
|
||||
@@ -174,19 +174,17 @@ HB_FUNC( HB_LIBDO )
|
||||
|
||||
if( pDynSym )
|
||||
{
|
||||
USHORT uiPCount = hb_pcount();
|
||||
USHORT uiParam;
|
||||
int iPCount = hb_pcount();
|
||||
int iParam;
|
||||
|
||||
hb_vmPushSymbol( pDynSym->pSymbol );
|
||||
hb_vmPushNil();
|
||||
|
||||
/* same logic here as from HB_FUNC( EVAL ) */
|
||||
for( uiParam = 2; uiParam <= uiPCount; uiParam++ )
|
||||
{
|
||||
hb_vmPush( hb_stackItemFromBase( uiParam ) );
|
||||
}
|
||||
for( iParam = 2; iParam <= iPCount; iParam++ )
|
||||
hb_vmPush( hb_stackItemFromBase( iParam ) );
|
||||
|
||||
hb_vmProc( ( USHORT ) ( uiPCount - 1 ) );
|
||||
hb_vmProc( ( USHORT ) ( iPCount - 1 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ PHB_ITEM hb_itemDoC( const char * szFunc, ULONG ulPCount, ... )
|
||||
hb_vmPush( va_arg( va, PHB_ITEM ) );
|
||||
va_end( va );
|
||||
}
|
||||
hb_vmProc( ( unsigned short ) ulPCount );
|
||||
hb_vmProc( ( USHORT ) ulPCount );
|
||||
pResult = hb_itemNew( hb_stackReturnItem() );
|
||||
hb_vmRequestRestore();
|
||||
}
|
||||
@@ -419,14 +419,14 @@ HB_FUNC( HB_EXECFROMARRAY )
|
||||
PHB_ITEM pArray = NULL;
|
||||
PHB_ITEM pItem;
|
||||
ULONG ulParamOffset = 0;
|
||||
USHORT usPCount = hb_pcount();
|
||||
int iPCount = hb_pcount();
|
||||
|
||||
/* decode parameters */
|
||||
if( usPCount )
|
||||
if( iPCount )
|
||||
{
|
||||
PHB_ITEM pParam = hb_param( 1, HB_IT_ANY );
|
||||
PHB_ITEM pParam = hb_param( 1, HB_IT_ANY );
|
||||
|
||||
if( usPCount == 1 )
|
||||
if( iPCount == 1 )
|
||||
{
|
||||
if( HB_IS_ARRAY( pParam ) && !HB_IS_OBJECT( pParam ) )
|
||||
{
|
||||
@@ -447,13 +447,13 @@ HB_FUNC( HB_EXECFROMARRAY )
|
||||
else
|
||||
pFunc = pParam;
|
||||
}
|
||||
else if( HB_IS_OBJECT( pParam ) && usPCount <= 3 )
|
||||
else if( HB_IS_OBJECT( pParam ) && iPCount <= 3 )
|
||||
{
|
||||
pSelf = pParam;
|
||||
pFunc = hb_param( 2, HB_IT_ANY );
|
||||
pArray = hb_param( 3, HB_IT_ANY );
|
||||
}
|
||||
else if( usPCount == 2 )
|
||||
else if( iPCount == 2 )
|
||||
{
|
||||
pFunc = pParam;
|
||||
pArray = hb_param( 2, HB_IT_ANY );
|
||||
@@ -475,7 +475,7 @@ HB_FUNC( HB_EXECFROMARRAY )
|
||||
|
||||
if( pExecSym )
|
||||
{
|
||||
usPCount = 0;
|
||||
iPCount = 0;
|
||||
hb_vmPushSymbol( pExecSym );
|
||||
if( pSelf )
|
||||
hb_vmPush( pSelf );
|
||||
@@ -485,18 +485,18 @@ HB_FUNC( HB_EXECFROMARRAY )
|
||||
if( pArray )
|
||||
{
|
||||
pItem = hb_arrayGetItemPtr( pArray, ++ulParamOffset );
|
||||
while( pItem && usPCount < 255 )
|
||||
while( pItem && iPCount < 255 )
|
||||
{
|
||||
hb_vmPush( pItem );
|
||||
++usPCount;
|
||||
++iPCount;
|
||||
pItem = hb_arrayGetItemPtr( pArray, ++ulParamOffset );
|
||||
}
|
||||
}
|
||||
|
||||
if( pSelf )
|
||||
hb_vmSend( usPCount );
|
||||
hb_vmSend( ( USHORT ) iPCount );
|
||||
else
|
||||
hb_vmProc( usPCount );
|
||||
hb_vmProc( ( USHORT ) iPCount );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE_SubstR( EG_ARG, 1099, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
@@ -508,7 +508,7 @@ BOOL hb_execFromArray( PHB_ITEM pParam )
|
||||
PHB_ITEM pArray = NULL;
|
||||
PHB_ITEM pSelf = NULL;
|
||||
ULONG ulParamOffset = 0;
|
||||
USHORT usPCount = 0;
|
||||
int iPCount = 0;
|
||||
|
||||
if( pParam && HB_IS_ARRAY( pParam ) && !HB_IS_OBJECT( pParam ) )
|
||||
{
|
||||
@@ -547,18 +547,18 @@ BOOL hb_execFromArray( PHB_ITEM pParam )
|
||||
if( pArray )
|
||||
{
|
||||
pParam = hb_arrayGetItemPtr( pArray, ++ulParamOffset );
|
||||
while( pParam && usPCount < 255 )
|
||||
while( pParam && iPCount < 255 )
|
||||
{
|
||||
hb_vmPush( pParam );
|
||||
++usPCount;
|
||||
++iPCount;
|
||||
pParam = hb_arrayGetItemPtr( pArray, ++ulParamOffset );
|
||||
}
|
||||
}
|
||||
|
||||
if( pSelf )
|
||||
hb_vmSend( usPCount );
|
||||
hb_vmSend( ( USHORT ) iPCount );
|
||||
else
|
||||
hb_vmProc( usPCount );
|
||||
hb_vmProc( ( USHORT ) iPCount );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@ HB_FUNC( EVAL )
|
||||
|
||||
if( pItem )
|
||||
{
|
||||
USHORT uiPCount = hb_pcount();
|
||||
USHORT uiParam;
|
||||
int iPCount = hb_pcount();
|
||||
int iParam;
|
||||
|
||||
hb_vmPushSymbol( &hb_symEval );
|
||||
hb_vmPush( pItem );
|
||||
@@ -72,10 +72,10 @@ HB_FUNC( EVAL )
|
||||
* because we need to pass the references too.
|
||||
* hb_param() is dereferencing the passed parameters
|
||||
*/
|
||||
for( uiParam = 2; uiParam <= uiPCount; uiParam++ )
|
||||
hb_vmPush( hb_stackItemFromBase( uiParam ) );
|
||||
for( iParam = 2; iParam <= iPCount; iParam++ )
|
||||
hb_vmPush( hb_stackItemFromBase( iParam ) );
|
||||
|
||||
hb_vmSend( ( USHORT ) ( uiPCount - 1 ) );
|
||||
hb_vmSend( ( USHORT ) ( iPCount - 1 ) );
|
||||
}
|
||||
else
|
||||
hb_errRT_BASE_SubstR( EG_NOMETHOD, 1004, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
|
||||
|
||||
Reference in New Issue
Block a user