From 710d86d31cd278583ee3d74b36595f4148a72133 Mon Sep 17 00:00:00 2001 From: Sven Gothel <sgothel@jausoft.com> Date: Sat, 5 Jun 2010 00:03:49 +0200 Subject: Minor additions to nio/Buffers, util/IntIntHashMap and os/NativeLibrary Buffers add 'float[] getFloatArray(double[])' conversion, ready to replace all JOGL InternalBufferUtil's. NativeLibrary/DynamicLinker add global lookup method allowing Unices and OSX to lookup a symbol globally. However, this is not recommended, due to the lookup costs. Windows is not supported here. Primitive type HashMap's (IntIntHashMap): Added putAll() --- src/java/com/jogamp/common/os/MacOSXDynamicLinkerImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/java/com/jogamp/common/os/MacOSXDynamicLinkerImpl.java') diff --git a/src/java/com/jogamp/common/os/MacOSXDynamicLinkerImpl.java b/src/java/com/jogamp/common/os/MacOSXDynamicLinkerImpl.java index 531bc5c..0e71d5d 100755 --- a/src/java/com/jogamp/common/os/MacOSXDynamicLinkerImpl.java +++ b/src/java/com/jogamp/common/os/MacOSXDynamicLinkerImpl.java @@ -5,6 +5,8 @@ package com.jogamp.common.os; public class MacOSXDynamicLinkerImpl implements DynamicLinker { + public static final long RTLD_DEFAULT = -2; + public static final int RTLD_LAZY = 0x1; public static final int RTLD_NOW = 0x2; public static final int RTLD_LOCAL = 0x4; @@ -50,6 +52,10 @@ public class MacOSXDynamicLinkerImpl implements DynamicLinker { return dlsym(libraryHandle, symbolName); } + public long lookupSymbolGlobal(String symbolName) { + return dlsym(RTLD_DEFAULT, symbolName); + } + public void closeLibrary(long libraryHandle) { dlclose(libraryHandle); } -- cgit v1.2.3