Explorar o código

* support varbyref and vararray (the latter if convertable to a single
element of its element type) in TBinaryObjectWriter.WriteVariant
by letting variantmanager handle their conversion transparently

git-svn-id: trunk@13075 -

Jonas Maebe %!s(int64=16) %!d(string=hai) anos
pai
achega
d89eedf38d
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      rtl/objpas/classes/writer.inc

+ 3 - 1
rtl/objpas/classes/writer.inc

@@ -375,7 +375,9 @@ end;
 
 procedure TBinaryObjectWriter.WriteVariant(const VarValue: variant);
 begin
-  case tvardata(VarValue).vtype of
+  { The variant manager will handle varbyref and vararray transparently for us
+  }
+  case (tvardata(VarValue).vtype and varTypeMask) of
     varEmpty:
       begin
         WriteValue(vaNil);