Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: What gets compiled?

  1. #11

    What gets compiled?

    Yes, with virtuals being removed it won't be possible this trick:

    Quote Originally Posted by technomage
    the API
    [pascal]
    type TTestClass = class
    procedure DoStuff; virtual; abstract;
    end;
    [/pascal]


    The DLL
    [pascal]
    type TTestClassImp = class(TTestClass)
    procedure DoStuff; override;
    end;
    [/pascal]
    Taken from: http://www.pascalgamedevelopment.com...ic.php?p=33814

  2. #12

    What gets compiled?

    well this "trick" is totaly unsafe and shouldn't be used....2 different versions of the same compiler (or 2 different compilers for the same language ) "might" handle virtual method calls differently (VMT slot at a different offset)...if you want such behaviour, use interfaces instead - they will work the way expected on all compilers in the same manner (not taking into account calling convention or compiler/language-specific types)...

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •