Jump AfterConstruction method

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Jump AfterConstruction method

Joao Morais

Hello,

I have a constructor that, is some circumstances, need to return nil (is
part of an OPF framework), after calling the inherited create method.
This piece of code works fine with Delphi:

   Destroy;
   Self := nil;
   asm
     MOV     [EBP - $09], EAX // Avoid calling AfterConstruction
     POP     dword ptr fs:[$00000000]
     ADD     ESP, $0C
   end;

What should I do for a FPC platform independent code?

Thanks,
--
Joao Morais
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal