2009-06-19 18:38 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbhrb.ch
* harbour/source/vm/runner.c
+ added support for HB_HRB_BIND_LAZY flag.
Lazy binding with public external functions allows to load .hrb files
with unresolved or cross function references.
This commit is contained in:
@@ -17,6 +17,13 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-06-19 18:38 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbhrb.ch
|
||||
* harbour/source/vm/runner.c
|
||||
+ added support for HB_HRB_BIND_LAZY flag.
|
||||
Lazy binding with public external functions allows to load .hrb files
|
||||
with unresolved or cross function references.
|
||||
|
||||
2009-06-19 10:48 UTC+0600 April White (april users.sourceforge.net)
|
||||
* contrib\hbblat\blatcls.prg
|
||||
* PROCEDURE Check() CLASS HBBlat -> METHOD returning Self
|
||||
|
||||
@@ -70,6 +70,11 @@
|
||||
|
||||
#define HB_HRB_BIND_FORCELOCAL 0x3 /* covert all public functions to STATIC ones */
|
||||
|
||||
#define HB_HRB_BIND_MASK 0x3 /* HB_HRB_BIND_* mask */
|
||||
#define HB_HRB_BIND_MODEMASK 0x3 /* HB_HRB_BIND_* mode mask */
|
||||
|
||||
#define HB_HRB_BIND_LAZY 0x4 /* lazy binding with external public
|
||||
functions allows to load .hrb files
|
||||
with unresolved or cross function
|
||||
references */
|
||||
|
||||
#endif /* HB_HRB_CH_ */
|
||||
|
||||
@@ -311,7 +311,7 @@ static PHRB_BODY hb_hrbLoad( const char * szHrbBody, ULONG ulBodySize, USHORT us
|
||||
ULONG ulSize; /* Size of function */
|
||||
ULONG ul, ulPos;
|
||||
char * buffer, ch;
|
||||
USHORT usBind = ( usMode & HB_HRB_BIND_MASK );
|
||||
USHORT usBind = ( usMode & HB_HRB_BIND_MODEMASK );
|
||||
|
||||
PHB_SYMB pSymRead; /* Symbols read */
|
||||
PHB_DYNF pDynFunc; /* Functions read */
|
||||
@@ -473,13 +473,18 @@ static PHRB_BODY hb_hrbLoad( const char * szHrbBody, ULONG ulBodySize, USHORT us
|
||||
}
|
||||
else if( ( pSymRead[ ul ].scope.value & HB_FS_DEFERRED ) == 0 )
|
||||
{
|
||||
char szName[ HB_SYMBOL_NAME_LEN + 1 ];
|
||||
if( ( usMode & HB_HRB_BIND_LAZY ) != 0 )
|
||||
pSymRead[ ul ].scope.value |= HB_FS_DEFERRED;
|
||||
else
|
||||
{
|
||||
char szName[ HB_SYMBOL_NAME_LEN + 1 ];
|
||||
|
||||
hb_strncpy( szName, pSymRead[ ul ].szName, sizeof( szName ) - 1 );
|
||||
hb_xfree( pSymRead );
|
||||
hb_hrbUnLoad( pHrbBody );
|
||||
hb_errRT_BASE( EG_ARG, 6101, "Unknown or unregistered symbol", szName, 0 );
|
||||
return NULL;
|
||||
hb_strncpy( szName, pSymRead[ ul ].szName, sizeof( szName ) - 1 );
|
||||
hb_xfree( pSymRead );
|
||||
hb_hrbUnLoad( pHrbBody );
|
||||
hb_errRT_BASE( EG_ARG, 6101, "Unknown or unregistered symbol", szName, 0 );
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user