2005-11-22 10:31 UTC+0100 Viktor Szakats (viktor.szakats/syenar.hu)
* source/rtl/symbol.prg
* source/vm/dynsym.c
* include/hbextern.ch
! Moved and renamed two functions from BEGINDUMP to their
proper place.
GETSYMBOLPOINTER() -> __DYNSGETPOINTER()
GETSYMBOLNAME() -> __DYNSGETNAME()
+ Added the two functions to hbextern.ch
+ TOFIX added to symbol.prg to remove the remaining one C
function inside BEGINDUMP. (Antonio, can you take a look?)
This commit is contained in:
@@ -8,6 +8,18 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
* fixed <-x-> match marker
|
||||
2005-11-22 10:31 UTC+0100 Viktor Szakats (viktor.szakats/syenar.hu)
|
||||
* source/rtl/symbol.prg
|
||||
* source/vm/dynsym.c
|
||||
* include/hbextern.ch
|
||||
! Moved and renamed two functions from BEGINDUMP to their
|
||||
proper place.
|
||||
GETSYMBOLPOINTER() -> __DYNSGETPOINTER()
|
||||
GETSYMBOLNAME() -> __DYNSGETNAME()
|
||||
+ Added the two functions to hbextern.ch
|
||||
+ TOFIX added to symbol.prg to remove the remaining one C
|
||||
function inside BEGINDUMP. (Antonio, can you take a look?)
|
||||
|
||||
2005-11-22 10:08 UTC+0100 Viktor Szakats (viktor.szakats/syenar.hu)
|
||||
* doc/en/hb_apifs.txt
|
||||
! Fixed doc for hb_fsSetDevMode()
|
||||
|
||||
@@ -359,6 +359,8 @@ EXTERNAL HB_WILDMATCH
|
||||
EXTERNAL HB_CLOCKS2SECS
|
||||
EXTERNAL HB_MATHERRMODE
|
||||
EXTERNAL HB_MATHERRORBLOCK
|
||||
EXTERNAL __DYNSGETPOINTER
|
||||
EXTERNAL __DYNSGETNAME
|
||||
|
||||
/* CA-Cl*pper compatible internal functions */
|
||||
|
||||
|
||||
@@ -50,32 +50,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* uncomment this section for a working sample
|
||||
|
||||
// Class(y) Class Symbol documentation is located at:
|
||||
// http://www.clipx.net/ng/classy/ngdebc.php
|
||||
|
||||
function Main()
|
||||
|
||||
local oSym := Symbol():New( "QOUT" )
|
||||
|
||||
? "Now test the :Exec() method"
|
||||
|
||||
oSym:Exec( "This string is being printed by QOUT" )
|
||||
oSym:Exec( "which is being invoked by the :Exec()" )
|
||||
oSym:Exec( "method in the Symbol class." )
|
||||
|
||||
?
|
||||
? "symbol name: ", oSym:name
|
||||
|
||||
? "Comparing QOut symbol with xOut symbol"
|
||||
? oSym:IsEqual( Symbol():New( "xOut" ) )
|
||||
|
||||
? "done!"
|
||||
?
|
||||
|
||||
return nil */
|
||||
|
||||
#include "hbclass.ch"
|
||||
|
||||
CLASS Symbol
|
||||
@@ -91,13 +65,13 @@ CLASS Symbol
|
||||
|
||||
METHOD _name( cName ) VIRTUAL // name simulates a read-only DATA so it
|
||||
// can't be assigned
|
||||
METHOD name() INLINE GetSymbolName( ::nSym ) // retrieves the symbol name
|
||||
METHOD name() INLINE __DynSGetName( ::nSym ) // retrieves the symbol name
|
||||
|
||||
ENDCLASS
|
||||
|
||||
METHOD New( cSymName ) CLASS Symbol
|
||||
|
||||
::nSym = GetSymbolPointer( cSymName )
|
||||
::nSym = __DynSGetPointer( cSymName )
|
||||
|
||||
return Self
|
||||
|
||||
@@ -111,21 +85,11 @@ return .f.
|
||||
|
||||
#pragma BEGINDUMP
|
||||
|
||||
/* TOFIX: Not to use BEGINDUMP in Harbour core code. Move SYMBOL_EXEC to symbolc.c */
|
||||
|
||||
#include <hbapi.h>
|
||||
#include <hbvm.h>
|
||||
|
||||
HB_FUNC( GETSYMBOLPOINTER )
|
||||
{
|
||||
hb_retptr( hb_dynsymGet( hb_parc( 1 ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( GETSYMBOLNAME )
|
||||
{
|
||||
PHB_DYNS pDynSym = ( PHB_DYNS ) hb_parptr( 1 );
|
||||
|
||||
hb_retc( ( pDynSym != NULL ? pDynSym->pSymbol->szName : "" ) );
|
||||
}
|
||||
|
||||
HB_FUNC( SYMBOL_EXEC )
|
||||
{
|
||||
PHB_ITEM pSelf = hb_param( 0, HB_IT_OBJECT ); /* we retrieve Self */
|
||||
|
||||
@@ -416,3 +416,15 @@ HB_FUNC( __DYNSGETPRF ) /* profiler: It returns an array with a function or proc
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
HB_FUNC( __DYNSGETPOINTER )
|
||||
{
|
||||
hb_retptr( hb_dynsymGet( hb_parc( 1 ) ) );
|
||||
}
|
||||
|
||||
HB_FUNC( __DYNSGETNAME )
|
||||
{
|
||||
PHB_DYNS pDynSym = ( PHB_DYNS ) hb_parptr( 1 );
|
||||
|
||||
hb_retc( ( pDynSym != NULL ? pDynSym->pSymbol->szName : "" ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user