Mercurial > projects > dwt2
diff base/src/java/nonstandard/SharedLib.d @ 47:65761bc28ab2
swt linux again compilable for d1.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 27 Mar 2009 11:43:53 +0100 |
parents | 17310ba3c1bc |
children | 8a5386b204bb |
line wrap: on
line diff
--- a/base/src/java/nonstandard/SharedLib.d Fri Mar 27 11:10:45 2009 +0100 +++ b/base/src/java/nonstandard/SharedLib.d Fri Mar 27 11:43:53 2009 +0100 @@ -1,6 +1,10 @@ module java.nonstandard.SharedLib; import java.lang.all; +version(Tango){ + static import tango.sys.SharedLib; + static import tango.stdc.stringz; +} struct Symbol { String name; @@ -21,7 +25,7 @@ foreach( inout s; symbols ){ if( s.major < major ) continue; if( s.major == major && s.minor > minor ) continue; - *s.symbol = lib.getSymbol( s.name.ptr ); + *s.symbol = lib.getSymbol( tango.stdc.stringz.toStringz(s.name ) ); if( s.symbol is null ){ getDwtLogger.error( __FILE__, __LINE__, "{}: Symbol '{}' not found", libname, s.name ); } @@ -37,7 +41,7 @@ version(Tango){ if (auto lib = tango.sys.SharedLib.SharedLib.load(libname)) { foreach( inout s; symbols ){ - *s.symbol = lib.getSymbol( s.name.ptr ); + *s.symbol = lib.getSymbol( tango.stdc.stringz.toStringz(s.name ) ); if( s.symbol is null ){ getDwtLogger.error( __FILE__, __LINE__, "{}: Symbol '{}' not found", libname, s.name ); } @@ -53,7 +57,7 @@ bool result = false; version(Tango){ if (auto lib = tango.sys.SharedLib.SharedLib.load( libname ) ) { - void* ptr = lib.getSymbol(symbolname); + void* ptr = lib.getSymbol( tango.stdc.stringz.toStringz(symbolname)); if (ptr !is null){ dg(ptr); result = true;