Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-03

Variants patch

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Enables inserting variants arrays into variant.

Index: rtl/inc/variants.pp
=================================================================== --- rtl/inc/variants.pp (revision 10368)
+++ rtl/inc/variants.pp (working copy)
@@ -3166,7 +3166,7 @@

       Result:=true
     else
       begin

- Result:=(aVarType and not(varByRef)) in [varEmpty,varNull,varSmallInt,varInteger,varSingle,varDouble,
+ Result:=(aVarType and not(varByRef) and not(varArray)) in [varEmpty,varNull,varSmallInt,varInteger,varSingle,varDouble, varCurrency,varDate,varOleStr,varDispatch,varError,varBoolean,

           varVariant,varUnknown,varShortInt,varByte,varWord,varLongWord,varInt64];
       end;
Ing. Petr Kristan . EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice tel: +420 466335223 Czech Republic (Eastern Europe) fax: +420 466510709

Reply by email

Florian Klaempfl
to Unknown author
Enables inserting variants arrays into variant.

Do you have a test which shows how this works? Is this delphi compatible? Are you sure that it is enough just to allow it?

Show quoted text 16 lines
Index: rtl/inc/variants.pp =================================================================== --- rtl/inc/variants.pp (revision 10368) +++ rtl/inc/variants.pp (working copy) @@ -3166,7 +3166,7 @@ Result:=true else begin - Result:=(aVarType and not(varByRef)) in [varEmpty,varNull,varSmallInt,varInteger,varSingle,varDouble, + Result:=(aVarType and not(varByRef) and not(varArray)) in [varEmpty,varNull,varSmallInt,varInteger,varSingle,varDouble, varCurrency,varDate,varOleStr,varDispatch,varError,varBoolean, varVariant,varUnknown,varShortInt,varByte,varWord,varLongWord,varInt64]; end;

Reply by email

Unknown author
to Florian Klaempfl
Florian Klaempfl wrote 5 lines
schrieb: > Enables inserting variants arrays into variant. Do you have a test which shows how this works? Is this delphi compatible? Are you sure that it is enough just to allow it?

I tested it on our delphi application, which uses deeply nested variant arrays. Results are the same compiled by delphi or fpc. I will continue with testnig this week.

Show quoted text 20 lines
> > Index: rtl/inc/variants.pp > =================================================================== > --- rtl/inc/variants.pp (revision 10368) > +++ rtl/inc/variants.pp (working copy) > @@ -3166,7 +3166,7 @@ > Result:=true > else > begin > - Result:=(aVarType and not(varByRef)) in [varEmpty,varNull,varSmallInt,varInteger,varSingle,varDouble, > + Result:=(aVarType and not(varByRef) and not(varArray)) in [varEmpty,varNull,varSmallInt,varInteger,varSingle,varDouble, > varCurrency,varDate,varOleStr,varDispatch,varError,varBoolean, > varVariant,varUnknown,varShortInt,varByte,varWord,varLongWord,varInt64]; > end; > > _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel
Ing. Petr Kristan . EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice tel: +420 466335223 Czech Republic (Eastern Europe) fax: +420 466510709

Reply by email