2001-06-03 09:35 UTC+1 JFL (mafact) <jfl@mafact.com>

This commit is contained in:
Jean-Francois Lefebvre
2001-06-03 07:32:42 +00:00
parent 6aaecd70e6
commit 2089356692
2 changed files with 7 additions and 105 deletions

View File

@@ -1,3 +1,8 @@
2001-06-03 09:35 UTC+1 JFL (mafact) <jfl@mafact.com>
* harbour/source/vm/Classe.c
* Temporary disabled scoping for rel. 0.37 !
2001-06-01 10:30 UTC-0800 Ron Pinkas <ron@profit-master.com>
* contrib/dot/pp.prg
+ PP_RunArray( asLines, aParams )

View File

@@ -400,113 +400,10 @@ void hb_clsIsClassRef( void )
}
}
void hb_clsScope( PHB_ITEM pObject, PMETHOD pMethod )
{
PHB_ITEM * pBase = hb_stack.pBase;
LONG iLevel = 1;
BOOL bRetVal ;
USHORT uiScope = pMethod->uiScope;
PHB_DYNS pMessage = pMethod->pMessage;
char szName[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 32 ];
char * szNameBase;
char * szNameObject;
/* We have to rethink about hidden, in the meantime, better to do nothing :( */
/* if ( (( uiScope & HB_OO_CLSTP_PROTECTED ) == HB_OO_CLSTP_PROTECTED ) || */
/* (( uiScope & HB_OO_CLSTP_HIDDEN ) == HB_OO_CLSTP_HIDDEN ) || */
/* (( uiScope & HB_OO_CLSTP_READONLY ) == HB_OO_CLSTP_READONLY ) */
/* ) */
if ( (( uiScope & HB_OO_CLSTP_PROTECTED ) == HB_OO_CLSTP_PROTECTED ) ||
(( uiScope & HB_OO_CLSTP_READONLY ) == HB_OO_CLSTP_READONLY )
)
{
while( ( iLevel-- > 0 ) && pBase != hb_stack.pItems )
pBase = hb_stack.pItems + ( *pBase )->item.asSymbol.stackbase;
szNameBase = hb_objGetClsName( *(pBase + 1) );
szNameObject = hb_objGetClsName( pObject );
/* Huumm probably an inline so back one ... */
if ( ( strcmp( szNameBase, "__EVAL" ) != 0 ) && pBase != hb_stack.pItems)
{
pBase = hb_stack.pItems + ( *pBase )->item.asSymbol.stackbase;
szNameBase = hb_objGetClsName( *(pBase + 1) );
}
if( iLevel == -1 )
{
if( ( *( pBase + 1 ) )->type == HB_IT_ARRAY ) /* it is a message */
{
if( ( uiScope & HB_OO_CLSTP_PROTECTED ) == HB_OO_CLSTP_PROTECTED )
{
bRetVal = ( strcmp( szNameBase, szNameObject ) != 0 );
if( bRetVal )
{
strcpy( szName, szNameObject );
strcat( szName, ":" );
strcat( szName, pMessage->pSymbol->szName );
hb_errRT_BASE( EG_NOMETHOD, 1004, "Scope violation (protected)", szName, 0 );
}
}
/* We have to rethink about hidden, in the meantime, better to do nothing :( */
/* if( ( uiScope & HB_OO_CLSTP_HIDDEN ) == HB_OO_CLSTP_HIDDEN ) */
/* { */
/* if( ( uiScope & HB_OO_CLSTP_SUPER ) == HB_OO_CLSTP_SUPER ) */
/* bRetVal = TRUE; */
/* else */
/* bRetVal = ( strcmp( szNameBase, szNameObject ) != 0 ); */
/* */
/* if( bRetVal ) */
/* { */
/* strcpy( szName, szNameObject ); */
/* strcat( szName, ":" ); */
/* strcat( szName, pMessage->pSymbol->szName ); */
/* hb_errRT_BASE( EG_NOMETHOD, 1004, "Scope violation (hidden)", szName ); */
/* } */
/* } */
}
else if( ( uiScope & HB_OO_CLSTP_PROTECTED ) == HB_OO_CLSTP_PROTECTED )
{
strcpy( szName, szNameObject );
strcat( szName, ":" );
strcat( szName, pMessage->pSymbol->szName );
hb_errRT_BASE( EG_NOMETHOD, 1004, "Scope violation (protected)", szName, 0 );
}
/* We have to rethink about hidden, in the meantime, better to do nothing :( */
/* else if( ( uiScope & HB_OO_CLSTP_HIDDEN ) == HB_OO_CLSTP_HIDDEN ) */
/* { */
/* strcpy( szName, szNameObject ); */
/* strcat( szName, ":" ); */
/* strcat( szName, pMessage->pSymbol->szName ); */
/* hb_errRT_BASE( EG_NOMETHOD, 1004, "Scope violation (hidden)", szName ); */
/* } */
#ifdef HB_CLS_ENFORCERO /* Not enabled by default */
if( ( uiScope & HB_OO_CLSTP_READONLY ) == HB_OO_CLSTP_READONLY )
{
if(
( pMethod->pFunction == hb___msgSetData ) ||
( pMethod->pFunction == hb___msgSetClsData ) ||
( pMethod->pFunction == hb___msgSetShrData )
)
bRetVal = TRUE;
if( bRetVal )
{
strcpy( szName, szNameObject );
strcat( szName, ":" );
strcat( szName, pMessage->pSymbol->szName );
hb_errRT_BASE( EG_NOMETHOD, 1004, "Scope violation (readonly)", szName, 0 );
}
}
#endif
}
}
/* Will be re-Enabled after rel 0.37 (JFL) */
}
ULONG hb_cls_MsgToNum( PHB_DYNS pMsg )