+ Merged revision 244

git-svn-id: branches/fixes_2_0@245 -
This commit is contained in:
michael 2005-06-07 20:49:28 +00:00
parent 0b6ef7f14e
commit c68b1ee148
25 changed files with 0 additions and 95 deletions

View File

@ -766,7 +766,5 @@ begin
errno := 0;
{ Setup command line arguments }
argc:=GetParamCount(args);
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
end.

View File

@ -539,8 +539,6 @@ begin
(* This should be changed to a real value during *)
(* thread driver initialization if appropriate. *)
ThreadID := 1;
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
initwidestringmanager;
end.

View File

@ -254,8 +254,6 @@ Begin
SetupCmdLine;
{ threading }
InitSystemThreads;
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
initwidestringmanager;
End.

View File

@ -571,9 +571,7 @@ begin
InitSystemThreads;
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
if os_Mode in [osDOS,osDPMI] then
DosEnvInit;

View File

@ -648,8 +648,6 @@ Begin
InitDPMIExcp;
InstallDefaultHandlers;
{$endif EXCEPTIONS_IN_SYSTEM}
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
initwidestringmanager;
End.

View File

@ -202,7 +202,6 @@ Procedure fpc_Write_Text_Boolean(Len : Longint;var t : Text;b : Boolean); compil
Procedure fpc_Write_Text_Char(Len : Longint;var t : Text;c : Char); compilerproc;
Procedure fpc_Write_Text_WideChar(Len : Longint;var t : Text;c : WideChar); compilerproc;
{$ifdef HASVARIANT}
procedure fpc_variant_copy(d,s : 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;
@ -211,7 +210,6 @@ function fpc_variant_to_interface(const v : variant) : iinterface;compilerproc;
function fpc_interface_to_variant(const i : iinterface) : variant;compilerproc;
procedure fpc_vararray_get(var d : variant;const s : variant;indices : psizeint;len : sizeint);compilerproc;
procedure fpc_vararray_put(var d : variant;const s : variant;indices : psizeint;len : sizeint);compilerproc;
{$endif HASVARIANT}
Procedure fpc_Read_End(var f:Text); compilerproc;
Procedure fpc_ReadLn_End(var f : Text); compilerproc;

View File

@ -296,9 +296,7 @@
{$ifdef HASCURRENCY}
vtCurrency : (VCurrency: PCurrency);
{$endif HASCURRENCY}
{$ifdef HASVARIANT}
vtVariant : (VVariant: PVariant);
{$endif HASVARIANT}
vtInterface : (VInterface: Pointer);
vtWideString : (VWideString: Pointer);
vtInt64 : (VInt64: PInt64);

View File

@ -136,10 +136,8 @@ begin
tkObject,
tkRecord:
recordrtti(data,typeinfo,@int_initialize);
{$ifdef HASVARIANT}
tkVariant:
variant_init(PVarData(Data)^);
{$endif HASVARIANT}
end;
end;
@ -169,10 +167,8 @@ begin
end;
tkDynArray:
fpc_dynarray_decr_ref(PPointer(Data)^,TypeInfo);
{$ifdef HASVARIANT}
tkVariant:
variant_clear(PVarData(Data)^);
{$endif HASVARIANT}
end;
end;
@ -193,10 +189,8 @@ begin
fpc_dynarray_incr_ref(PPointer(Data)^);
tkInterface:
Intf_Incr_Ref(PPointer(Data)^);
{$ifdef HASVARIANT}
tkVariant:
variant_addref(pvardata(Data)^);
{$endif HASVARIANT}
end;
end;
@ -222,10 +216,8 @@ begin
fpc_dynarray_decr_ref(PPointer(Data)^,TypeInfo);
tkInterface:
Intf_Decr_Ref(PPointer(Data)^);
{$ifdef HASVARIANT}
tkVariant:
variant_clear(pvardata(data)^);
{$endif HASVARIANT}
end;
end;

View File

@ -279,9 +279,7 @@ end;
Variant support
*****************************************************************************}
{$ifdef HASVARIANT}
{$i variant.inc}
{$endif HASVARIANT}
{****************************************************************************
Run-Time Type Information (RTTI)
****************************************************************************}

View File

@ -262,10 +262,8 @@ Type
PDate = ^TDateTime;
PError = ^Error;
{$ifdef HASVARIANT}
PVariant = ^Variant;
POleVariant = ^OleVariant;
{$endif HASVARIANT}
PWideChar = ^WideChar;
PPWideChar = ^PWideChar;
@ -712,9 +710,7 @@ const
Variant support
*****************************************************************************}
{$ifdef HASVARIANT}
{$i varianth.inc}
{$endif HASVARIANT}
{*****************************************************************************
Internal helper routines support

View File

@ -243,8 +243,6 @@ Begin
InOutRes:=0;
{ threading }
InitSystemThreads;
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
initwidestringmanager;
End.

View File

@ -542,9 +542,7 @@ begin
InOutRes:=0;
errno:=0;
InitSystemThreads;
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
initwidestringmanager;
if StandAlone = 0 then

View File

@ -325,8 +325,6 @@ begin
{ Arguments }
GenerateArgs;
InitSystemThreads;
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
initwidestringmanager;
end.

View File

@ -479,8 +479,6 @@ Begin
IsConsole := TRUE;
ExitCode := 0;
InitSystemThreads;
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
initwidestringmanager;
End.

View File

@ -550,8 +550,6 @@ Begin
IsConsole := TRUE;
ExitCode := 0;
InitSystemThreads;
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
initwidestringmanager;
End.

View File

@ -12,7 +12,6 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{$ifdef HASVARIANT}
Resourcestring
@ -633,5 +632,4 @@ begin
end;
end;
{$endif HASVARIANT}

View File

@ -29,9 +29,6 @@ unit typinfo;
// temporary types:
type
{$ifndef HASVARIANT}
Variant = Pointer;
{$endif}
{$MINENUMSIZE 1 this saves a lot of memory }
// if you change one of the following enumeration types

View File

@ -16,7 +16,6 @@
**********************************************************************}
{$ifdef HASVARIANT}
Type
EVarianterror = Class(Exception)
ErrCode : longint;
@ -99,5 +98,4 @@ const
ARR_DISPATCH = $0400;
ARR_VARIANT = $0800;
{$endif HASVARIANT}

View File

@ -13,7 +13,6 @@
**********************************************************************}
{$ifdef HASVARIANT}
{ ---------------------------------------------------------------------
Some general stuff: Error handling and so on.
---------------------------------------------------------------------}
@ -718,4 +717,3 @@ begin
Result:=psa^.ElementSize;
end;
{$endif HASVARIANT}

View File

@ -757,9 +757,7 @@ begin
DefaultFileType := '';
InitSystemThreads;
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
{$IFDEF EXTDUMPGROW}
{ Int_HeapSize := high (cardinal);}

View File

@ -224,8 +224,6 @@ Begin
{ Arguments }
SetupCmdLine;
InitSystemThreads;
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
initwidestringmanager;
End.

View File

@ -1529,8 +1529,6 @@ Begin
InitDPMIExcp;
InstallDefaultHandlers;
{$endif EXCEPTIONS_IN_SYSTEM}
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
initwidestringmanager;
End.

View File

@ -1092,9 +1092,7 @@ begin
InitSystemThreads;
{ Reset internal error variable }
errno:=0;
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
initwidestringmanager;
InitWin32Widestrings
end.

View File

@ -35,7 +35,6 @@ Implementation
Windows external definitions.
---------------------------------------------------------------------}
{$ifdef HASVARIANT}
const
oleaut = 'oleaut32.dll';
@ -69,6 +68,5 @@ function SafeArrayPutElement(psa: PVarArray; Indices: PVarArrayCoorArray; const
function SafeArrayRedim(psa: PVarArray; const NewBound: TVarArrayBound): HRESULT; stdcall;external oleaut;
function SafeArrayUnaccessData(psa: PVarArray): HRESULT; stdcall;external oleaut;
function SafeArrayUnlock(psa: PVarArray): HRESULT; stdcall;external oleaut;
{$endif HASVARIANT}
end.

View File

@ -6651,44 +6651,6 @@
TWOHandleArray = array[0..MAXIMUM_WAIT_OBJECTS-1] of HANDLE;
PWOHandleArray = ^TWOHandleArray;
{$ifndef HASVARIANT}
{ This causes trouble with a compiler which has real variant support FK }
{ Variant support }
TVarType = Word;
PVariant = ^TVariant;
{ This variant type definition doesn't contain _all_ possible variant
types - some are not possible atm with FPC, e.g. VT_BSTR to mention
This is part of the variant definition used by Windows API not that Borland
TVarRec one which is already partially implemented.
Needed for some COM objects }
TVariant = record
vt: TVarType;
wReserved1: Word;
wReserved2: Word;
wReserved3: Word;
case Integer of
VT_UI1: (bVal: Byte);
VT_I2: (iVal: Smallint);
VT_I4: (lVal: Longint);
VT_R4: (fltVal: Single);
VT_R8: (dblVal: Double);
VT_BOOL: (vbool: WordBool);
VT_ERROR: (scode: HResult);
VT_BYREF or VT_UI1: (pbVal: ^Byte);
VT_BYREF or VT_I2: (piVal: ^Smallint);
VT_BYREF or VT_I4: (plVal: ^Longint);
VT_BYREF or VT_R4: (pfltVal: ^Single);
VT_BYREF or VT_R8: (pdblVal: ^Double);
VT_BYREF or VT_BOOL: (pbool: ^WordBool);
VT_BYREF or VT_ERROR: (pscode: ^HResult);
VT_BYREF: (byRef: Pointer);
end;
VARIANT = TVariant;
{$endif HASVARIANT}
MMRESULT = Longint;
type