Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changes between Version 1 and Version 2 of static_ctors

Show
Ignore:
Author:
keinfarbton (IP: 217.228.186.69)
Timestamp:
04/03/07 07:55:24 (17 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • static_ctors

    v1 v2  
    44 
    55The solution is a generated 'staticctors.d' file, which contains all call to these static ctors. Therefor, the ctors are renamed to normal static functions, called "public static static_this()". The user of TioPort does now edit this file, by deciding the sequence of static ctor calls manually. 
     6 
     7TioPort generates code for every class, that is placed into a static_this. It is the class registration. Because of this, every ported class has a static_this method. 
     8 
     9The initialization process is a tricky thing and needs special attention. The staticctor.d can be taken as a template for a manually written one. In Swt the staticctor file calls the one from dejavu.