Przemek
May be I could not present my case properly.
I understand your implementation of new GT and also
how it is behaving. My request is based on the new OBJECT
modal I am building on lines with Xbase++ where I needed
such functionality.
I only need GTINFO manipulation is such way nothing else.
Below is my proposed changes to bring this feature:
hbapigt.h [#146]
-------------
typedef struct
{
PHB_ITEM pNewVal;
PHB_ITEM pResult;
PHB_ITEM pNewVal2;
PHB_ITEM pGT; // New Member
} HB_GT_INFO, * PHB_GT_INFO;
hbgtcore.c [#1614]
------------------
gtInfo.pNewVal = gtInfo.pNewVal2 = gtInfo.pResult = gtInfo.pGT = NULL; //
new members
gtfunc.c [#116]
---------------
HB_FUNC( HB_GTINFOEX ) // New Function
{
if( ISPOINTER( 1 ) && ISNUM( 2 ) )
{
HB_GT_INFO gtInfo;
gtInfo.pGT = hb_param( 1, HB_IT_ANY );
gtInfo.pNewVal = hb_param( 3, HB_IT_ANY );
gtInfo.pNewVal2 = hb_param( 4, HB_IT_ANY );
gtInfo.pResult = NULL;
hb_gtInfo( hb_parni( 2 ), >Info );
if( gtInfo.pResult )
hb_itemReturnRelease( gtInfo.pResult );
}
else
hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME,
HB_ERR_ARGS_BASEPARAMS );
}
gtwvg.c [#2397]
---------------
static BOOL hb_gt_wvt_Info( PHB_GT pGTx, int iType, PHB_GT_INFO pInfo ) //
initial change
{
PHB_GT pGT = NULL;
PHB_GTWVT pWVT;
int iVal;
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_wvt_Info(%p,%d,%p)", pGT, iType, pInfo )
);
if( pInfo->pGT && hb_itemType( pInfo->pGT ) & HB_IT_POINTER )
{
pGT = hb_gt_ItemBase( pInfo->pGT );
if( pGT )
hb_gt_BaseFree( pGT );
else
pGT = pGTx;
}
if( !pGT )
{
pGT = pGTx;
}
....
....
Above changes does not disturb current GT implementation. I
have tested extensively with both GTWVT and GTWVG. Instead
it empowers me to manipulate GTs running in different threads
from current thread. I have some interesting usage in place
and hopefully by ths weekend I be able to upload partial but
working xbase++ cmpatible class structure in GTWVG, pure console.
If agreed let me know if I can commit above changes.
Regards
Pritpal Bedi
--
View this message in context:
http://www.nabble.com/hb_gtInfoEx%28-pGT%2C-nGtInfo%2C-xValue%2C-xValue2-%29---Feature-Request-tp20414605p20455052.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour