mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 14:26:16 +02:00
* implemented helper for variant<->dyn. array type cast
This commit is contained in:
parent
d0191eaa3c
commit
7fb9bd0f57
@ -198,8 +198,9 @@ Procedure fpc_Write_Text_WideChar(Len : Longint;var t : Text;c : WideChar); comp
|
||||
{$endif HASWIDECHAR}
|
||||
|
||||
{$ifdef HASVARIANT}
|
||||
// function fpc_variant_to_dynarray(const v : variant;typeinfo : pointer) : pointer;compilerproc;
|
||||
procedure fpc_write_text_variant(Len : Longint;var f : Text;const v : variant); compilerproc;
|
||||
function fpc_variant_to_dynarray(const v : variant;typeinfo : pointer) : pointer;compilerproc;
|
||||
function fpc_dynarray_to_variant(dynarr : pointer;typeinfo : pointer) : variant;compilerproc;
|
||||
{$endif HASVARIANT}
|
||||
|
||||
Procedure fpc_Read_End(var f:Text); compilerproc;
|
||||
@ -348,7 +349,10 @@ function fpc_qword_to_double(q: qword): double; compilerproc;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.61 2004-11-21 16:14:59 jonas
|
||||
Revision 1.62 2004-12-05 11:49:06 florian
|
||||
* implemented helper for variant<->dyn. array type cast
|
||||
|
||||
Revision 1.61 2004/11/21 16:14:59 jonas
|
||||
* fixed remaining compilation problems
|
||||
|
||||
Revision 1.60 2004/11/21 15:35:23 peter
|
||||
|
@ -60,26 +60,28 @@ Begin
|
||||
If (InOutRes<>0) then
|
||||
exit;
|
||||
case TextRec(f).mode of
|
||||
fmOutput { fmAppend gets changed to fmOutPut in do_open (JM) }:
|
||||
{ fmAppend gets changed to fmOutPut in do_open (JM) }
|
||||
fmOutput:
|
||||
if len=-1 then
|
||||
variantmanager.write0variant(f,v)
|
||||
else
|
||||
variantmanager.writevariant(f,v,len);
|
||||
fmInput: InOutRes:=105
|
||||
fmInput:
|
||||
InOutRes:=105
|
||||
else InOutRes:=103;
|
||||
end;
|
||||
End;
|
||||
|
||||
|
||||
function fpc_variant_to_dynarray(const v : variant;typeinfo : pointer) : pointer;compilerproc;
|
||||
begin
|
||||
{$warning TODO fpc_variant_to_dynarray}
|
||||
result:=nil;
|
||||
variantmanager.vartodynarray(result,v,typeinfo);
|
||||
end;
|
||||
|
||||
function fpc_dynarray_to_variant(const v : variant;typeinfo : pointer) : pointer;compilerproc;
|
||||
|
||||
function fpc_dynarray_to_variant(dynarr : pointer;typeinfo : pointer) : variant;compilerproc;
|
||||
begin
|
||||
{$warning TODO fpc_dynarray_to_variant}
|
||||
result:=nil;
|
||||
variantmanager.varfromdynarray(result,dynarr,typeinfo);
|
||||
end;
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
@ -601,7 +603,10 @@ procedure initvariantmanager;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.18 2004-08-18 21:03:35 florian
|
||||
Revision 1.19 2004-12-05 11:49:06 florian
|
||||
* implemented helper for variant<->dyn. array type cast
|
||||
|
||||
Revision 1.18 2004/08/18 21:03:35 florian
|
||||
* sparc uses wait4 as well
|
||||
|
||||
Revision 1.17 2004/05/31 20:25:04 peter
|
||||
|
Loading…
Reference in New Issue
Block a user