From c75dbfdf0c7e554903c176aebc13919ad2292d08 Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 9 Oct 2002 20:13:26 +0000 Subject: [PATCH] * hopefully last fix to get things working :/ --- rtl/inc/variant.inc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/rtl/inc/variant.inc b/rtl/inc/variant.inc index b8d31eee01..391f9a18ed 100644 --- a/rtl/inc/variant.inc +++ b/rtl/inc/variant.inc @@ -44,7 +44,9 @@ end; procedure variant_init(var v : variant);[Public,Alias:'FPC_VARIANT_INIT']; begin - variantmanager.varinit(v); + { calling the variant manager here is a problem because the static/global variants + are initialized while the variant manager isn't assigned } + fillchar(v,sizeof(variant),0); end; procedure variant_clear(var v : variant);[Public,Alias:'FPC_VARIANT_CLEAR']; @@ -554,10 +556,8 @@ procedure initvariantmanager; begin VarDispProc:=@vardisperror; DispCallByIDProc:=@vardisperror; - { tvardata(Unassigned).VType:=varEmpty; tvardata(Null).VType:=varNull; - } for i:=0 to (sizeof(tvariantmanager) div sizeof(pointer))-1 do ppointer(@variantmanager+i*sizeof(pointer))^:=@invalidvariantop; pointer(variantmanager.varclear):=@varclear @@ -566,7 +566,10 @@ procedure initvariantmanager; { $Log$ - Revision 1.10 2002-10-09 19:56:01 florian + Revision 1.11 2002-10-09 20:13:26 florian + * hopefully last fix to get things working :/ + + Revision 1.10 2002/10/09 19:56:01 florian * variant assignments don't work yet, commented out Revision 1.9 2002/10/09 19:08:22 florian @@ -584,4 +587,4 @@ procedure initvariantmanager; Revision 1.5 2002/09/07 15:07:46 peter * old logs removed and tabs fixed -} +} \ No newline at end of file