cxflag203 / superobject

Automatically exported from code.google.com/p/superobject
0 stars 0 forks source link

Doesn't compile on FPC 2.7.1 on Linux, QueryInterface, _AddRef and _Release declarations #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
QueryInterface, _AddRef and _Release have a different signature on FPC on 
Linux. (cdecl instead of stdcall)

Index: source/superobject.pas
===================================================================
--- source/superobject.pas  (révision 54)
+++ source/superobject.pas  (copie de travail)
@@ -654,8 +654,8 @@
 {$ELSE}
     function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall;
 {$ENDIF}
-    function _AddRef: Integer; virtual; stdcall;
-    function _Release: Integer; virtual; stdcall;
+    function _AddRef : longint;{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
+    function _Release : longint;{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};

     function GetO(const path: SOString): ISuperObject;
     procedure PutO(const path: SOString; const Value: ISuperObject);
@@ -5223,12 +5223,12 @@
   end;
 end;

-function TSuperObject._AddRef: Integer; stdcall;
+function TSuperObject._AddRef : longint;{$IFNDEF 
WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
 begin
   Result := InterlockedIncrement(FRefCount);
 end;

-function TSuperObject._Release: Integer; stdcall;
+function TSuperObject._Release : longint;{$IFNDEF 
WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
 begin
   Result := InterlockedDecrement(FRefCount);
   if Result = 0 then
@@ -7611,4 +7611,4 @@
   Assert(debugcount = 0, 'Memory leak');
 {$ENDIF}
 end.
-

Original issue reported on code.google.com by hubert.t...@gmail.com on 9 Jan 2013 at 2:53

GoogleCodeExporter commented 9 years ago
Already reported... Please close.

Original comment by hubert.t...@gmail.com on 9 Jan 2013 at 2:55