see changelog
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
19990531-09:45 CET Eddie Runia
|
||||
* tests/working/inherit.prg
|
||||
newer test program. reported crash was due to static functions ?
|
||||
* source/rtl/classes.c
|
||||
some small improvements
|
||||
|
||||
19990531-16:35 CET Matthew Hamilton (upload by Eddie Runia)
|
||||
* tests/working/inifiles.prg
|
||||
version 2 which creates harbour.new
|
||||
|
||||
@@ -68,10 +68,12 @@ HARBOUR CLASSCREATE() /* cClassName, nDatas, hSuper --> hClass */
|
||||
pClasses[ wClasses ].wDataFirst = pClasses[ hSuper ].wDatas;
|
||||
pClasses[ wClasses ].wDatas = pClasses[ hSuper ].wDatas + _parni(2);
|
||||
pClasses[ wClasses ].wMethods = pClasses[ hSuper ].wMethods;
|
||||
|
||||
pClasses[ wClasses ].pClassDatas =
|
||||
hb_arrayClone( pClasses[ hSuper ].pClassDatas );
|
||||
pClasses[ wClasses ].pInlines =
|
||||
hb_arrayClone( pClasses[ hSuper ].pInlines );
|
||||
|
||||
pClasses[ wClasses ].wHashKey = pClasses[ hSuper ].wHashKey;
|
||||
pClasses[ wClasses ].pMethods = ( PMETHOD ) _xgrab(
|
||||
pClasses[ hSuper ].wHashKey * BUCKET * sizeof( METHOD ) );
|
||||
@@ -86,13 +88,10 @@ HARBOUR CLASSCREATE() /* cClassName, nDatas, hSuper --> hClass */
|
||||
pClasses[ wClasses ].pMethods = ( PMETHOD ) _xgrab( 100 * sizeof( METHOD ) );
|
||||
pClasses[ wClasses ].wMethods = 0;
|
||||
pClasses[ wClasses ].wHashKey = 25; /* BUCKET = 4 repetitions */
|
||||
pClasses[ wClasses ].pClassDatas = hb_itemNew( 0 );
|
||||
pClasses[ wClasses ].pInlines = hb_itemNew( 0 );
|
||||
/* pClasses[ wClasses ].pInitValues = hb_itemNew( 0 ); */
|
||||
|
||||
hb_arrayNew( pClasses[ wClasses ].pClassDatas, 0 );
|
||||
hb_arrayNew( pClasses[ wClasses ].pInlines, 0 );
|
||||
/* hb_arrayNew( pClasses[ wClasses ].pInitValues, 0 ); */
|
||||
pClasses[ wClasses ].pClassDatas = hb_itemArrayNew( 0 );
|
||||
pClasses[ wClasses ].pInlines = hb_itemArrayNew( 0 );
|
||||
/* pClasses[ wClasses ].pInitValues = hb_itemArrayNew( 0 ); */
|
||||
|
||||
memset( pClasses[ wClasses ].pMethods, 0, 100 * sizeof( METHOD ) );
|
||||
}
|
||||
@@ -749,7 +748,7 @@ HARBOUR __INSTSUPER( void ) /* ClassH := __InstSuper( <cName> ) */
|
||||
{
|
||||
PushSymbol( pDynSym->pSymbol ); /* Push function name */
|
||||
PushNil();
|
||||
Do( 0 ); /* Execute super class */
|
||||
Function( 0 ); /* Execute super class */
|
||||
|
||||
if( !IS_OBJECT( &stack.Return ) )
|
||||
{
|
||||
|
||||
@@ -48,14 +48,12 @@ function TEmpty()
|
||||
|
||||
oEmpty := TClass():New( "TEmpty" ) // Create a new class def
|
||||
|
||||
// oEmpty:AddInline( "New", {|self|self} ) // Can cause crash ?
|
||||
oEmpty:AddInline( "New", {|self|self} )
|
||||
|
||||
oEmpty:AddMethod( "New", @New() ) // Constructor
|
||||
oEmpty:AddInline( "Run", {||QOut( "Run!" ) } ) // Test command
|
||||
// oEmpty:AddInline( "Set", {|self,xParam|::Out := xParam } )
|
||||
oEmpty:AddInline( "Set", {|self,xParam| oSend(self,"_Out",xParam) } )
|
||||
oEmpty:AddData( "Out", 1 )
|
||||
// Test command
|
||||
oEmpty:AddData( "Out", 1 ) // Test command
|
||||
oEmpty:AddVirtual( "Dispose" ) // Clean up code
|
||||
|
||||
oEmpty:Create()
|
||||
@@ -107,7 +105,7 @@ return oFile:Instance()
|
||||
// <cMode> mode for opening. Default "R"
|
||||
// <nBlockSize> Optional maximum blocksize
|
||||
//
|
||||
static function New( cFileName, cMode, nBlock )
|
||||
function New( cFileName, cMode, nBlock )
|
||||
|
||||
local self := QSelf() // Get self
|
||||
|
||||
@@ -135,7 +133,7 @@ static function New( cFileName, cMode, nBlock )
|
||||
return self
|
||||
|
||||
|
||||
static function Run( xTxt, lCRLF )
|
||||
function Run( xTxt, lCRLF )
|
||||
|
||||
local self := QSelf()
|
||||
local xRet
|
||||
@@ -151,7 +149,7 @@ return xRet
|
||||
//
|
||||
// Dispose -> Close the file handle
|
||||
//
|
||||
static function Dispose()
|
||||
function Dispose()
|
||||
|
||||
local self := QSelf()
|
||||
|
||||
@@ -171,7 +169,7 @@ return self
|
||||
//
|
||||
// Read a single line
|
||||
//
|
||||
static function Read()
|
||||
function Read()
|
||||
|
||||
local self := QSelf()
|
||||
local cRet := ""
|
||||
@@ -228,7 +226,7 @@ return cRet
|
||||
// one or more strings
|
||||
// <lCRLF> End with Carriage Return/Line Feed (Default == TRUE)
|
||||
//
|
||||
static function WriteLn( xTxt, lCRLF )
|
||||
function WriteLn( xTxt, lCRLF )
|
||||
|
||||
local self := QSelf()
|
||||
local cBlock
|
||||
@@ -251,7 +249,7 @@ static function WriteLn( xTxt, lCRLF )
|
||||
return self
|
||||
|
||||
|
||||
static function Write( xTxt )
|
||||
function Write( xTxt )
|
||||
|
||||
local self := QSelf()
|
||||
|
||||
@@ -267,7 +265,7 @@ return ::WriteLn( xTxt, .F. )
|
||||
//
|
||||
// Go to a specified line number
|
||||
//
|
||||
static function Goto( nLine )
|
||||
function Goto( nLine )
|
||||
|
||||
local self := QSelf()
|
||||
local nWhere := 1
|
||||
|
||||
Reference in New Issue
Block a user