Browse Source

+ implemented empty Aquire/Release for SynchroObject, fixes bug #3821

git-svn-id: trunk@102 -
florian 20 years ago
parent
commit
5e8e8fc5e4
4 changed files with 32 additions and 18 deletions
  1. 1 0
      .gitattributes
  2. 11 9
      fcl/inc/syncob.inc
  3. 2 9
      fcl/inc/syncobh.inc
  4. 18 0
      tests/webtbs/tw3821.pp

+ 1 - 0
.gitattributes

@@ -6098,6 +6098,7 @@ tests/webtbs/tw3796.pp svneol=native#text/plain
 tests/webtbs/tw3805.pp svneol=native#text/plain
 tests/webtbs/tw3805.pp svneol=native#text/plain
 tests/webtbs/tw3812.pp svneol=native#text/plain
 tests/webtbs/tw3812.pp svneol=native#text/plain
 tests/webtbs/tw3814.pp svneol=native#text/plain
 tests/webtbs/tw3814.pp svneol=native#text/plain
+tests/webtbs/tw3821.pp svneol=native#text/plain
 tests/webtbs/tw3827.pp svneol=native#text/plain
 tests/webtbs/tw3827.pp svneol=native#text/plain
 tests/webtbs/tw3833.pp svneol=native#text/plain
 tests/webtbs/tw3833.pp svneol=native#text/plain
 tests/webtbs/tw3840.pp svneol=native#text/plain
 tests/webtbs/tw3840.pp svneol=native#text/plain

+ 11 - 9
fcl/inc/syncob.inc

@@ -12,21 +12,23 @@
 
 
  **********************************************************************}
  **********************************************************************}
 
 
+procedure TSyncroObject.Acquire;
+  begin
+  end;
+  
+  
+procedure TSyncroObject.Release;
+  begin
+  end;
+  
+  
 procedure TCriticalSection.Enter;
 procedure TCriticalSection.Enter;
-
   begin
   begin
      Acquire;
      Acquire;
   end;
   end;
 
 
-procedure TCriticalSection.Leave;
 
 
+procedure TCriticalSection.Leave;
   begin
   begin
      Release;
      Release;
   end;
   end;
-
-{
-  $Log: syncob.inc,v $
-  Revision 1.4  2005/02/14 17:13:15  peter
-    * truncate log
-
-}

+ 2 - 9
fcl/inc/syncobh.inc

@@ -16,8 +16,8 @@ type
    TWaitResult = (wrSignaled, wrTimeout, wrAbandoned, wrError);
    TWaitResult = (wrSignaled, wrTimeout, wrAbandoned, wrError);
 
 
    TSyncroObject = class(TObject)
    TSyncroObject = class(TObject)
-      procedure Acquire;virtual;abstract;
-      procedure Release;virtual;abstract;
+      procedure Acquire;virtual;
+      procedure Release;virtual;
    end;
    end;
 
 
    TCriticalSection = class(TSyncroObject)
    TCriticalSection = class(TSyncroObject)
@@ -62,10 +62,3 @@ type
    TSimpleEvent = class(TEventObject)
    TSimpleEvent = class(TEventObject)
       constructor Create;
       constructor Create;
    end;
    end;
-
-{
-  $Log: syncobh.inc,v $
-  Revision 1.7  2005/02/14 17:13:15  peter
-    * truncate log
-
-}

+ 18 - 0
tests/webtbs/tw3821.pp

@@ -0,0 +1,18 @@
+{ %OPT=-Sew }
+
+{ Source provided for Free Pascal Bug Report 3821 }
+{ Submitted by "Matthias Hryniszak" on  2005-03-24 }
+{ e-mail: [email protected] }
+program Test;
+
+uses
+  SyncObjs;
+
+var
+  Event: TSimpleEvent;
+
+begin
+  // The following line produces a compile-time
+  // warning
+  Event := TSimpleEvent.Create;
+end.