dwsJSONConnector does not compile in D2010
Issue #13
resolved
There's only one function that fails to compile. Thus, I think it can still be supported:
function TBoxedJSONValue.QueryInterface({$IFDEF FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} IID: TGUID; out Obj): HResult; begin if IID=IBoxedJSONValue then begin //<-- Error on this line PIUnknown(@Obj)^:=IBoxedJSONValue(Self); Result:=0; end else Result:=inherited QueryInterface(IID, Obj); end;
[DCC Error] dwsJSONConnector.pas(319): E2015 Operator not applicable to this operand type
Comments (4)
-
repo owner -
I have the same problem. I commented the function and just left inherited. Seems to work fine so far .. Would be nice to have a suggestion. REgards
-
Patch:
diff --git a/Source/dwsJSONConnector.pas b/Source/dwsJSONConnector.pas index 9af2085..8591ba6 100644 --- a/Source/dwsJSONConnector.pas +++ b/Source/dwsJSONConnector.pas @@ -316,7 +316,7 @@ end; // function TBoxedJSONValue.QueryInterface({$IFDEF FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} IID: TGUID; out Obj): HResult; begin - if IID=IBoxedJSONValue then begin + if IsEqualGUID(IID, IBoxedJSONValue) then begin PIUnknown(@Obj)^:=IBoxedJSONValue(Self); Result:=0; end else Result:=inherited QueryInterface(IID, Obj);
-
repo owner - changed status to resolved
Fixed Issue
#13→ <<cset d7cb74248ba7>>
- Log in to comment
I do not have D2010 around anymore, what alternative code would be supported in that version?