2005-11-16 13:14 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* xharbour/include/hbvmpub.h
    * changed definition of HB_SYMB structure.
          HB_SYMBOLSCOPE    cScope
      replaced by:
         union
         {
            HB_SYMBOLSCOPE    value;      /* the scope of the symbol */
            void *            pointer;    /* filler to force alignment */
         } scope;
      This modification should only force the same alignment independently
      on used compiler alignment switches or executed #pragma pack*
      It's important to keep this structure with fixed size because it's
      used in .c files generated from .prg code.
      The code with #pragma pack* removed - it should not be longer
      necessary but please make a real tests with different compiler
      alignment switches

  * harbour/contrib/btree/hb_btree.c
  * harbour/contrib/rdd_ads/ads1.c
  * harbour/contrib/runjava/runjava.c
  * harbour/source/compiler/genc.c
  * harbour/source/rdd/dbf1.c
  * harbour/source/rdd/delim1.c
  * harbour/source/rdd/sdf1.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbfdbt/dbfdbt1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/vm/dynsym.c
  * harbour/source/vm/hvm.c
  * harbour/source/vm/initsymb.c
  * harbour/source/vm/runner.c
    * updated for modified HB_SYMB structure.
This commit is contained in:
Przemyslaw Czerpak
2005-11-16 12:27:55 +00:00
parent 5d6b9d803e
commit 035d484e54
17 changed files with 168 additions and 136 deletions

View File

@@ -176,10 +176,10 @@ JNIEXPORT jlong JNICALL Java_Harbour_Run( JNIEnv *env,
for( ul = 0; ul < ulSymbols; ul++ ) /* Read symbols in .HRB */
{
pSymRead[ ul ].szName = hb_hrbFileReadId( file );
pSymRead[ ul ].cScope = hb_hrbFileReadByte( file );
pSymRead[ ul ].pFunPtr = ( PHB_FUNC ) ( ULONG ) hb_hrbFileReadByte( file );
pSymRead[ ul ].pDynSym = NULL;
pSymRead[ ul ].szName = hb_hrbFileReadId( file );
pSymRead[ ul ].scope.value = hb_hrbFileReadByte( file );
pSymRead[ ul ].pFunPtr = ( PHB_FUNC ) ( ULONG ) hb_hrbFileReadByte( file );
pSymRead[ ul ].pDynSym = NULL;
}
ulFuncs = hb_hrbFileReadLong( file ); /* Read number of functions */
@@ -209,7 +209,7 @@ JNIEXPORT jlong JNICALL Java_Harbour_Run( JNIEnv *env,
{
/* Exists and NOT static ? */
/* if( hb_dynsymFind( pSymRead[ ul ].szName ) &&
!( pSymRead[ ul ].cScope & FS_STATIC ) )
!( pSymRead[ ul ].scope.value & FS_STATIC ) )
{
hb_errRT_BASE( EG_ARG, 9999, "Duplicate symbol", pSymRead[ ul ].szName );
bError = TRUE;
@@ -244,7 +244,7 @@ JNIEXPORT jlong JNICALL Java_Harbour_Run( JNIEnv *env,
*/
for( ul = 0; ul < ulSymbols; ul++ ) /* Check INIT functions */
{
if( ( pSymRead[ ul ].cScope & HB_FS_INITEXIT ) == HB_FS_INITEXIT )
if( ( pSymRead[ ul ].scope.value & HB_FS_INITEXIT ) == HB_FS_INITEXIT )
{
/* call (_INITSTATICS) function. This function assigns
* literal values to static variables only. There is no need
@@ -256,7 +256,7 @@ JNIEXPORT jlong JNICALL Java_Harbour_Run( JNIEnv *env,
}
for( ul = 0; ul < ulSymbols; ul++ ) /* Check INIT functions */
{
if( ( pSymRead[ ul ].cScope & HB_FS_INITEXIT ) == HB_FS_INIT )
if( ( pSymRead[ ul ].scope.value & HB_FS_INITEXIT ) == HB_FS_INIT )
{
hb_vmPushSymbol( pSymRead + ul );
hb_vmPushNil();
@@ -278,12 +278,12 @@ JNIEXPORT jlong JNICALL Java_Harbour_Run( JNIEnv *env,
for( ul = 0; ul < ulSymbols; ul++ ) /* Check EXIT functions */
{
if( ( pSymRead[ ul ].cScope & HB_FS_INITEXIT ) == HB_FS_EXIT )
if( ( pSymRead[ ul ].scope.value & HB_FS_INITEXIT ) == HB_FS_EXIT )
{
hb_vmPushSymbol( pSymRead + ul );
hb_vmPushNil();
hb_vmDo( 0 ); /* Run exit function */
pSymRead[ ul ].cScope = pSymRead[ ul ].cScope & ( ~HB_FS_EXIT );
pSymRead[ ul ].scope.value = pSymRead[ ul ].scope.value & ( ~HB_FS_EXIT );
/* Exit function cannot be
handled by main in hvm.c */
}