|
From: Elias N. <eli...@us...> - 2005-12-19 10:57:31
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8223/src/java/org/lwjgl Modified Files: Sys.java Log Message: Added Sys.getVersion() in place of the compile time constant Sys.VERSION Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- Sys.java 17 Dec 2005 21:22:11 -0000 1.89 +++ Sys.java 19 Dec 2005 10:57:22 -0000 1.90 @@ -52,7 +52,7 @@ public final class Sys { /** Current version of library */ - public static final String VERSION = "0.99"; + private static final String VERSION = "0.99"; /** The native library name */ private static final String LIBRARY_NAME = "lwjgl"; @@ -69,8 +69,8 @@ } }); String native_version = implementation.getNativeLibraryVersion(); - if (!native_version.equals(VERSION)) - throw new LinkageError("Version mismatch: jar version is '" + VERSION + + if (!native_version.equals(getVersion())) + throw new LinkageError("Version mismatch: jar version is '" + getVersion() + "', native libary version is '" + native_version + "'"); implementation.setDebug(LWJGLUtil.DEBUG); } @@ -109,6 +109,13 @@ } /** + * Return the version of the core LWJGL libraries as a String. + */ + public static String getVersion() { + return VERSION; + } + + /** * Initialization. This is just a dummy method to trigger the static constructor. */ public static void initialize() { |