mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-05 17:27:26 +01:00
* do not generate references to the variant type, if the variants feature is not available
git-svn-id: trunk@37660 -
This commit is contained in:
parent
d8b71457f7
commit
0725bfcdf0
@ -380,8 +380,11 @@ implementation
|
||||
openchararraytype:=carraydef.create(0,-1,sizesinttype);
|
||||
tarraydef(openchararraytype).elementdef:=cansichartype;
|
||||
cfiletype:=cfiledef.createuntyped;
|
||||
cvarianttype:=cvariantdef.create(vt_normalvariant);
|
||||
colevarianttype:=cvariantdef.create(vt_olevariant);
|
||||
if f_variants in features then
|
||||
begin
|
||||
cvarianttype:=cvariantdef.create(vt_normalvariant);
|
||||
colevarianttype:=cvariantdef.create(vt_olevariant);
|
||||
end;
|
||||
|
||||
{$ifdef cpufpemu}
|
||||
{ Normal types }
|
||||
@ -469,8 +472,11 @@ implementation
|
||||
addtype('WideChar',cwidechartype);
|
||||
addtype('Text',cfiledef.createtext);
|
||||
addtype('TypedFile',cfiledef.createtyped(voidtype));
|
||||
addtype('Variant',cvarianttype);
|
||||
addtype('OleVariant',colevarianttype);
|
||||
if f_variants in features then
|
||||
begin
|
||||
addtype('Variant',cvarianttype);
|
||||
addtype('OleVariant',colevarianttype);
|
||||
end;
|
||||
{ Internal types }
|
||||
addtype('$undefined',cundefinedtype);
|
||||
addtype('$formal',cformaltype);
|
||||
@ -530,8 +536,11 @@ implementation
|
||||
{$endif x86}
|
||||
addtype('$openchararray',openchararraytype);
|
||||
addtype('$file',cfiletype);
|
||||
addtype('$variant',cvarianttype);
|
||||
addtype('$olevariant',colevarianttype);
|
||||
if f_variants in features then
|
||||
begin
|
||||
addtype('$variant',cvarianttype);
|
||||
addtype('$olevariant',colevarianttype);
|
||||
end;
|
||||
if init_settings.fputype<>fpu_none then
|
||||
begin
|
||||
addtype('$s32real',s32floattype);
|
||||
@ -678,8 +687,11 @@ implementation
|
||||
loadtype('vtblarray',vmtarraytype);
|
||||
loadtype('__vtbl_ptr_type',vmttype);
|
||||
end;
|
||||
loadtype('variant',cvarianttype);
|
||||
loadtype('olevariant',colevarianttype);
|
||||
if f_threading in features then
|
||||
begin
|
||||
loadtype('variant',cvarianttype);
|
||||
loadtype('olevariant',colevarianttype);
|
||||
end;
|
||||
loadtype('methodpointer',methodpointertype);
|
||||
loadtype('nestedprocpointer',nestedprocpointertype);
|
||||
loadtype('HRESULT',hresultdef);
|
||||
|
||||
@ -439,7 +439,9 @@
|
||||
vtPWideChar : (VPWideChar: PWideChar);
|
||||
vtAnsiString : (VAnsiString: Pointer);
|
||||
vtCurrency : (VCurrency: PCurrency);
|
||||
{$ifdef FPC_HAS_FEATURE_VARIANTS}
|
||||
vtVariant : (VVariant: PVariant);
|
||||
{$endif FPC_HAS_FEATURE_VARIANTS}
|
||||
vtInterface : (VInterface: Pointer);
|
||||
vtWideString : (VWideString: Pointer);
|
||||
vtInt64 : (VInt64: PInt64);
|
||||
|
||||
@ -567,8 +567,11 @@ Type
|
||||
PDateTime = ^TDateTime;
|
||||
{$endif}
|
||||
PError = ^TError;
|
||||
|
||||
{$ifdef FPC_HAS_FEATURE_VARIANTS}
|
||||
PVariant = ^Variant;
|
||||
POleVariant = ^OleVariant;
|
||||
{$endif FPC_HAS_FEATURE_VARIANTS}
|
||||
|
||||
PWideChar = ^WideChar;
|
||||
PPWideChar = ^PWideChar;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user