mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 17:32:21 +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}
|
{$endif HASWIDECHAR}
|
||||||
|
|
||||||
{$ifdef HASVARIANT}
|
{$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;
|
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}
|
{$endif HASVARIANT}
|
||||||
|
|
||||||
Procedure fpc_Read_End(var f:Text); compilerproc;
|
Procedure fpc_Read_End(var f:Text); compilerproc;
|
||||||
@ -348,7 +349,10 @@ function fpc_qword_to_double(q: qword): double; compilerproc;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* fixed remaining compilation problems
|
||||||
|
|
||||||
Revision 1.60 2004/11/21 15:35:23 peter
|
Revision 1.60 2004/11/21 15:35:23 peter
|
||||||
|
@ -60,26 +60,28 @@ Begin
|
|||||||
If (InOutRes<>0) then
|
If (InOutRes<>0) then
|
||||||
exit;
|
exit;
|
||||||
case TextRec(f).mode of
|
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
|
if len=-1 then
|
||||||
variantmanager.write0variant(f,v)
|
variantmanager.write0variant(f,v)
|
||||||
else
|
else
|
||||||
variantmanager.writevariant(f,v,len);
|
variantmanager.writevariant(f,v,len);
|
||||||
fmInput: InOutRes:=105
|
fmInput:
|
||||||
|
InOutRes:=105
|
||||||
else InOutRes:=103;
|
else InOutRes:=103;
|
||||||
end;
|
end;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
function fpc_variant_to_dynarray(const v : variant;typeinfo : pointer) : pointer;compilerproc;
|
function fpc_variant_to_dynarray(const v : variant;typeinfo : pointer) : pointer;compilerproc;
|
||||||
begin
|
begin
|
||||||
{$warning TODO fpc_variant_to_dynarray}
|
variantmanager.vartodynarray(result,v,typeinfo);
|
||||||
result:=nil;
|
|
||||||
end;
|
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
|
begin
|
||||||
{$warning TODO fpc_dynarray_to_variant}
|
variantmanager.varfromdynarray(result,dynarr,typeinfo);
|
||||||
result:=nil;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ ---------------------------------------------------------------------
|
{ ---------------------------------------------------------------------
|
||||||
@ -601,7 +603,10 @@ procedure initvariantmanager;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* sparc uses wait4 as well
|
||||||
|
|
||||||
Revision 1.17 2004/05/31 20:25:04 peter
|
Revision 1.17 2004/05/31 20:25:04 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user