Changeset 3456
- Timestamp:
- 04/24/08 02:06:18 (7 months ago)
- Files:
-
- trunk/lib/common/tango/core/Runtime.d (modified) (2 diffs)
- trunk/lib/compiler/dmd/dmain2.d (modified) (2 diffs)
- trunk/lib/compiler/gdc/dgccmain2.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/common/tango/core/Runtime.d
r3145 r3456 17 17 alias Exception.TraceInfo function( void* ptr = null ) TraceHandler; 18 18 19 extern (C) void rt_setCollectHandler( CollectHandler h ); 20 extern (C) void rt_setTraceHandler( TraceHandler h ); 19 extern (C) void rt_setCollectHandler( CollectHandler h ); 20 extern (C) void rt_setTraceHandler( TraceHandler h ); 21 22 alias void delegate( Exception ) ExceptionHandler; 23 extern (C) bool rt_init( ExceptionHandler dg = null ); 24 extern (C) bool rt_term( ExceptionHandler dg = null ); 21 25 } 22 26 … … 33 37 struct Runtime 34 38 { 39 /** 40 * Initializes the runtime. This call is to be used in instances where the 41 * standard program initialization process is not executed. This is most 42 * often in shared libraries or in libraries linked to a C program. 43 * 44 * Params: 45 * dg = A delegate which will receive any exception thrown during the 46 * initialization process or null if such exceptions should be 47 * discarded. 48 * 49 * Returns: 50 * true if initialization succeeds and false if initialization fails. 51 */ 52 static bool initialize( void delegate( Exception ) dg = null ) 53 { 54 return rt_init( dg ); 55 } 56 57 58 /** 59 * Terminates the runtime. This call is to be used in instances where the 60 * standard program termination process will not be not executed. This is 61 * most often in shared libraries or in libraries linked to a C program. 62 * 63 * Params: 64 * dg = A delegate which will receive any exception thrown during the 65 * termination process or null if such exceptions should be 66 * discarded. 67 * 68 * Returns: 69 * true if termination succeeds and false if termination fails. 70 */ 71 static bool terminate( void delegate( Exception ) dg = null ) 72 { 73 return rt_term( dg ); 74 } 75 76 35 77 /** 36 78 * Returns true if the runtime is halting. Under normal circumstances, trunk/lib/compiler/dmd/dmain2.d
r3145 r3456 93 93 } 94 94 95 extern (C) bool rt_init( void delegate( Exception ) dg = null ) 95 alias void delegate( Exception ) ExceptionHandler; 96 97 extern (C) bool rt_init( ExceptionHandler dg = null ) 96 98 { 97 99 _d_criticalInit(); … … 127 129 } 128 130 129 extern (C) bool rt_term( void delegate( Exception )dg = null )131 extern (C) bool rt_term( ExceptionHandler dg = null ) 130 132 { 131 133 try trunk/lib/compiler/gdc/dgccmain2.d
r3145 r3456 107 107 } 108 108 109 extern (C) bool rt_init( void delegate( Exception ) dg = null ) 109 alias void delegate( Exception ) ExceptionHandler; 110 111 extern (C) bool rt_init( ExceptionHandler dg = null ) 110 112 { 111 113 _d_criticalInit(); … … 139 141 } 140 142 141 extern (C) bool rt_term( void delegate( Exception )dg = null )143 extern (C) bool rt_term( ExceptionHandler dg = null ) 142 144 { 143 145 try












