- Timestamp:
- 11/05/08 12:14:36 (2 months ago)
- Files:
-
- trunk/ddl/DynamicLibrary.d (modified) (1 diff)
- trunk/ddl/FileBuffer.d (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ddl/DynamicLibrary.d
r301 r313 139 139 typeof(T) getDExport() { 140 140 return cast(typeof(T))getSymbol("_D" ~ mangleSymbolName!(name) ~ T.mangleof).address; } 141 } 142 } 143 144 /** 145 Runtime method to do the exactly the same thing as the templated version 146 */ 147 template getDExport(T) { 148 static if(T.mangleof[0] == 'P'){ 149 typeof(T) getDExport(char[] name) { 150 return cast(typeof(T))getSymbol( "_D" ~ mangleNamespace(name) ~ T.mangleof[1..$]).address; 151 } 152 } else { 153 typeof(T) getDExport(char[] name) { 154 return cast(typeof(T))getSymbol("_D" ~ mangleNamespace(name) ~ T.mangleof).address; } 141 155 } 142 156 } trunk/ddl/FileBuffer.d
r300 r313 35 35 FileBuffer _this; 36 36 _this.path = new FilePath(path); 37 _this.data = cast(ubyte[])(new File(_this.path )).read;37 _this.data = cast(ubyte[])(new File(_this.path.toString)).read; 38 38 return _this; 39 39 } … … 42 42 FileBuffer _this; 43 43 _this.path = new FilePath(path.toString); 44 _this.data = cast(ubyte[])(new File(_this.path )).read;44 _this.data = cast(ubyte[])(new File(_this.path.toString)).read; 45 45 return _this; 46 46 } … … 65 65 66 66 void save(){ 67 (new File(this.path )).write(this.data);67 (new File(this.path.toString)).write(this.data); 68 68 } 69 69
