mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 00:42:06 +02:00
+ some variant stuff fixed and added
This commit is contained in:
parent
25ea80ba19
commit
74c89e2b87
@ -24,7 +24,6 @@ procedure invalidvariantop;
|
||||
end;
|
||||
|
||||
procedure vardisperror;
|
||||
|
||||
begin
|
||||
HandleErrorFrame(222,get_frame);
|
||||
end;
|
||||
@ -95,13 +94,13 @@ function fpc_dynarray_to_variant(dynarr : pointer;typeinfo : pointer) : variant;
|
||||
|
||||
function fpc_variant_to_interface(const v : variant) : iinterface;compilerproc;
|
||||
begin
|
||||
variantmanager.vartointf(result,v);
|
||||
variantmanager.vartointf(result,v);
|
||||
end;
|
||||
|
||||
|
||||
function fpc_interface_to_variant(const i : iinterface) : variant;compilerproc;
|
||||
begin
|
||||
variantmanager.varfromintf(result,i);
|
||||
variantmanager.varfromintf(result,i);
|
||||
end;
|
||||
|
||||
|
||||
@ -595,7 +594,10 @@ procedure initvariantmanager;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.24 2005-02-14 17:13:29 peter
|
||||
Revision 1.25 2005-02-24 22:36:36 florian
|
||||
+ some variant stuff fixed and added
|
||||
|
||||
Revision 1.24 2005/02/14 17:13:29 peter
|
||||
* truncate log
|
||||
|
||||
Revision 1.23 2005/02/01 20:22:24 florian
|
||||
|
@ -638,7 +638,7 @@ begin
|
||||
Result:=CheckVarArray(psa);
|
||||
if Result<>VAR_OK then
|
||||
exit;
|
||||
Inc(psa^.LockCount);
|
||||
InterlockedIncrement(psa^.LockCount);
|
||||
end;
|
||||
|
||||
Function SafeArrayUnlock(psa: PVarArray): HRESULT;stdcall;
|
||||
@ -646,8 +646,11 @@ begin
|
||||
Result:=CheckVarArray(psa);
|
||||
if (Result<>VAR_OK) then
|
||||
exit;
|
||||
If (psa^.LockCount>0) then
|
||||
Dec(psa^.LockCount);
|
||||
if InterlockedDecrement(psa^.LockCount)<0 then
|
||||
begin
|
||||
InterlockedIncrement(psa^.LockCount);
|
||||
result:=VAR_UNEXPECTED;
|
||||
end;
|
||||
end;
|
||||
|
||||
Function SafeArrayGetElement(psa: PVarArray; Indices: PVarArrayCoorArray;
|
||||
@ -712,7 +715,10 @@ end;
|
||||
{$endif HASVARIANT}
|
||||
{
|
||||
$Log$
|
||||
Revision 1.19 2005-02-14 17:13:31 peter
|
||||
Revision 1.20 2005-02-24 22:36:36 florian
|
||||
+ some variant stuff fixed and added
|
||||
|
||||
Revision 1.19 2005/02/14 17:13:31 peter
|
||||
* truncate log
|
||||
|
||||
Revision 1.18 2005/02/08 21:17:25 florian
|
||||
|
Loading…
Reference in New Issue
Block a user