Browse Source

* make procedures and functions, declared in the interface part of a unit in an
i8086 far code memory model to be 'far' even in {$F-} mode. This is TP7
compatible.

git-svn-id: trunk@38728 -

nickysn 7 years ago
parent
commit
17823821ca
2 changed files with 10 additions and 1 deletions
  1. 9 0
      compiler/i8086/symcpu.pas
  2. 1 1
      compiler/symdef.pas

+ 9 - 0
compiler/i8086/symcpu.pas

@@ -130,6 +130,7 @@ type
       - it has no 'near' or 'far' specifiers
       - it is compiled in a $F- state }
     function default_far:boolean;
+    procedure Setinterfacedef(AValue: boolean);override;
    public
     constructor create(level:byte;doregister:boolean);override;
     function getcopyas(newtyp:tdeftyp;copytyp:tproccopytyp):tstoreddef;override;
@@ -396,6 +397,14 @@ implementation
     end;
 
 
+  procedure tcpuprocdef.Setinterfacedef(AValue: boolean);
+    begin
+      inherited;
+      if (current_settings.x86memorymodel in x86_far_code_models) and AValue then
+        include(procoptions,po_far);
+    end;
+
+
   function tcpuprocdef.is_far: boolean;
     begin
       result:=(po_exports in procoptions) or

+ 1 - 1
compiler/symdef.pas

@@ -742,7 +742,7 @@ interface
          function Getforwarddef: boolean;
          procedure Setforwarddef(AValue: boolean);
          function Getinterfacedef: boolean;
-         procedure Setinterfacedef(AValue: boolean);
+         procedure Setinterfacedef(AValue: boolean);virtual;
          function Gethasforward: boolean;
          procedure Sethasforward(AValue: boolean);
          function GetIsEmpty: boolean;