Skip to content

Commit

Permalink
Merge pull request #970 from matthiasblaesing/restore-compatibilty-lo…
Browse files Browse the repository at this point in the history
…adLibrary

Restore compatibility of Native#loadLibrary, deprecate for Native#load
  • Loading branch information
matthiasblaesing authored Jun 4, 2018
2 parents 324de41 + 00d6b13 commit d42375c
Show file tree
Hide file tree
Showing 70 changed files with 184 additions and 138 deletions.
6 changes: 1 addition & 5 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Features
--------
* [#915](https://github.com/java-native-access/jna/pull/915): Adding interfaces to call to Cryptui and Crypt32 windows libraries and adding related structures to Wincrypt. - [@rosh89](https://github.com/rosh89).
* [#903](https://github.com/java-native-access/jna/pull/903): Carry `HRESULT` in `c.s.j.p.win32.COM.COMException`, introduce `c.s.j.p.win32.COM.COMInvokeException` as subclass of `COMException` for exception as the result of a `IDispatch#Invoke`. The `EXECPINFO` is unwrapped into fields in the `COMInvokeException` and correctly freed. - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#822](https://github.com/java-native-access/jna/issues/822): `Native#loadLibrary` requires that the interface class passed in is an instance of Library. The runtime check can be enhanced by using a constraint generic. This breaks binary compatibility (see notes below) - [@d-noll](https://github.com/d-noll).
* [#822](https://github.com/java-native-access/jna/issues/822): `Native#loadLibrary` requires that the interface class passed in is an instance of Library. The runtime check can be enhanced by using a constraint generic. This breaks binary compatibility (see notes below) - [@d-noll](https://github.com/d-noll).<br /><br />In a followup, the original `loadLibrary` methods were deprecated and `Native#load` methods were introduced, that hold the new generic definitions. So this change is now binary compatible.
* [#889](https://github.com/java-native-access/jna/issues/889): The `Structure#newInstance` receive the target type as a parameter. This adds a limited generic type, so that the return type ist the target type and not a generic structure, removing the necessity to do an explizit cast - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#913](https://github.com/java-native-access/jna/issues/913): Add `@ComInterface` annotation to `com.sun.jna.platform.win32.COM.util.IConnectionPoint` to make it possible to retrieve it via `IUnknown#queryInterface` - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#797](https://github.com/java-native-access/jna/issues/797): Binding `Advapi32#EnumDependendServices`, `Advapi32#EnumServicesStatusEx` and `Advapi32#QueryServiceStatus`. `W32Service#stopService` was modified to be more resilent when stopping service - [@matthiasblaesing](https://github.com/matthiasblaesing).
Expand Down Expand Up @@ -66,10 +66,6 @@ Breaking Changes
* `com.sun.jna.Native#setPreserveLastError` and `com.sun.jna.Native#getPreserveLastError`
were removed without replacement. They were turned into NOOPs in the past.
* `com.sun.jna.Native#getDirectByteBuffer` was replaced by `com.sun.jna.Pointer#getByteBuffer`
* `com.sun.jna.Native#loadLibrary` methods return a `T` instance and expect
a `Class<T>` as parameter. `T` was unconstraint and was modified to
extend `com.sun.jna.Library`. This change is source compatible, but not
binary compatbile, so bindings need to be recompiled.
* the parameters of the methods `gethostname`, `sethostname`, `getdomainname`
and `setdomainname` in the interface `com.sun.jna.platform.unix.LibCAPI`
were changed from `(char[] name, int len)` to `(byte[] name, int len)`
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/mac/Carbon.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* Date: 7/25/11
*/
public interface Carbon extends Library {
Carbon INSTANCE = Native.loadLibrary("Carbon", Carbon.class);
Carbon INSTANCE = Native.load("Carbon", Carbon.class);

int cmdKey = 0x0100;
int shiftKey = 0x0200;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class MacFileUtils extends FileUtils {

public interface FileManager extends Library {

FileManager INSTANCE = Native.loadLibrary("CoreServices", FileManager.class);
FileManager INSTANCE = Native.load("CoreServices", FileManager.class);

int kFSFileOperationDefaultOptions = 0;
int kFSFileOperationsOverwrite = 0x01;
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/mac/SystemB.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*/
public interface SystemB extends Library {

SystemB INSTANCE = Native.loadLibrary("System", SystemB.class);
SystemB INSTANCE = Native.load("System", SystemB.class);

// host_statistics()
int HOST_LOAD_INFO = 1;// System loading stats
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/mac/XAttr.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
interface XAttr extends Library {

// load from current image
XAttr INSTANCE = Native.loadLibrary(null, XAttr.class);
XAttr INSTANCE = Native.load(null, XAttr.class);

// see /usr/include/sys/xattr.h
int XATTR_NOFOLLOW = 0x0001;
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/unix/LibC.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
*/
public interface LibC extends LibCAPI, Library {
String NAME = "c";
LibC INSTANCE = Native.loadLibrary(NAME, LibC.class);
LibC INSTANCE = Native.load(NAME, LibC.class);
}
10 changes: 5 additions & 5 deletions contrib/platform/src/com/sun/jna/platform/unix/X11.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class XImage extends PointerType { }

/** Definition (incomplete) of the Xext library. */
interface Xext extends Library {
Xext INSTANCE = Native.loadLibrary("Xext", Xext.class);
Xext INSTANCE = Native.load("Xext", Xext.class);
// Shape Kinds
int ShapeBounding = 0;
int ShapeClip = 1;
Expand All @@ -307,7 +307,7 @@ void XShapeCombineMask(Display display, Window window, int dest_kind,

/** Definition (incomplete) of the Xrender library. */
interface Xrender extends Library {
Xrender INSTANCE = Native.loadLibrary("Xrender", Xrender.class);
Xrender INSTANCE = Native.load("Xrender", Xrender.class);

@FieldOrder({"red", "redMask", "green", "greenMask", "blue", "blueMask", "alpha", "alphaMask"})
class XRenderDirectFormat extends Structure {
Expand Down Expand Up @@ -346,7 +346,7 @@ class XRenderPictFormat extends Structure {
/** Definition of the Xevie library. */
interface Xevie extends Library {
/** Instance of Xevie. Note: This extension has been removed from xorg/xserver on Oct 22, 2008 because it is broken and maintainerless. */
Xevie INSTANCE = Native.loadLibrary("Xevie", Xevie.class);
Xevie INSTANCE = Native.load("Xevie", Xevie.class);
int XEVIE_UNMODIFIED = 0;
int XEVIE_MODIFIED = 1;
// Bool XevieQueryVersion (Display* display, int* major_version, int* minor_version);
Expand All @@ -363,7 +363,7 @@ interface Xevie extends Library {

/** Definition of the XTest library. */
interface XTest extends Library {
XTest INSTANCE = Native.loadLibrary("Xtst", XTest.class);///usr/lib/libxcb-xtest.so.0
XTest INSTANCE = Native.load("Xtst", XTest.class);///usr/lib/libxcb-xtest.so.0
boolean XTestQueryExtension(Display display, IntByReference event_basep, IntByReference error_basep, IntByReference majorp, IntByReference minorp);
boolean XTestCompareCursorWithWindow(Display display, Window window, Cursor cursor);
boolean XTestCompareCurrentCursorWithWindow(Display display, Window window);
Expand Down Expand Up @@ -395,7 +395,7 @@ class XDeviceByReference extends Structure implements Structure.ByReference {
public XInputClassInfoByReference classes;
}

X11 INSTANCE = Native.loadLibrary("X11", X11.class);
X11 INSTANCE = Native.load("X11", X11.class);

/*
typedef struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*/
public interface LibKstat extends Library {

LibKstat INSTANCE = Native.loadLibrary("kstat", LibKstat.class);
LibKstat INSTANCE = Native.load("kstat", LibKstat.class);

/*
* Kstat Data Types
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
* @author dblock[at]dblock.org
*/
public interface Advapi32 extends StdCallLibrary {
Advapi32 INSTANCE = Native.loadLibrary("Advapi32", Advapi32.class, W32APIOptions.DEFAULT_OPTIONS);
Advapi32 INSTANCE = Native.load("Advapi32", Advapi32.class, W32APIOptions.DEFAULT_OPTIONS);

int MAX_KEY_LENGTH = 255;
int MAX_VALUE_NAME = 16383;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*/
public interface Crypt32 extends StdCallLibrary {

Crypt32 INSTANCE = Native.loadLibrary("Crypt32", Crypt32.class, W32APIOptions.DEFAULT_OPTIONS);
Crypt32 INSTANCE = Native.load("Crypt32", Crypt32.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* The CryptProtectData function performs encryption on the data in a DATA_BLOB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
public interface Cryptui extends StdCallLibrary {

Cryptui INSTANCE = (Cryptui) Native.loadLibrary("Cryptui", Cryptui.class, W32APIOptions.UNICODE_OPTIONS);
Cryptui INSTANCE = (Cryptui) Native.load("Cryptui", Cryptui.class, W32APIOptions.UNICODE_OPTIONS);

/**
* The CryptUIDlgSelectCertificateFromStore function displays a dialog box that
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/win32/Ddeml.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
*/
public interface Ddeml extends StdCallLibrary {

Ddeml INSTANCE = Native.loadLibrary("user32", Ddeml.class, W32APIOptions.DEFAULT_OPTIONS);
Ddeml INSTANCE = Native.load("user32", Ddeml.class, W32APIOptions.DEFAULT_OPTIONS);

public class HCONVLIST extends PointerType {
};
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/win32/Dxva2.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public interface Dxva2 extends StdCallLibrary, PhysicalMonitorEnumerationAPI, Hi
/**
* The only instance of the library
*/
Dxva2 INSTANCE = Native.loadLibrary("Dxva2", Dxva2.class, DXVA_OPTIONS);
Dxva2 INSTANCE = Native.load("Dxva2", Dxva2.class, DXVA_OPTIONS);


/******************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/win32/GDI32.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
*/
public interface GDI32 extends StdCallLibrary {

GDI32 INSTANCE = Native.loadLibrary("gdi32", GDI32.class, W32APIOptions.DEFAULT_OPTIONS);
GDI32 INSTANCE = Native.load("gdi32", GDI32.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* Used with BitBlt. Copies the source rectangle directly to the destination
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
public interface Kernel32 extends StdCallLibrary, WinNT, Wincon {

/** The instance. */
Kernel32 INSTANCE = Native.loadLibrary("kernel32", Kernel32.class, W32APIOptions.DEFAULT_OPTIONS);
Kernel32 INSTANCE = Native.load("kernel32", Kernel32.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* <strong>LOAD_LIBRARY_AS_DATAFILE</strong> <br>
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/win32/Mpr.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

public interface Mpr extends StdCallLibrary {

Mpr INSTANCE = Native.loadLibrary("Mpr", Mpr.class, W32APIOptions.DEFAULT_OPTIONS);
Mpr INSTANCE = Native.load("Mpr", Mpr.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* The WNetOpenEnum function starts an enumeration of network resources or
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/win32/Msi.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
public interface Msi extends StdCallLibrary {

Msi INSTANCE = Native.loadLibrary("msi", Msi.class, W32APIOptions.DEFAULT_OPTIONS);
Msi INSTANCE = Native.load("msi", Msi.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* The component being requested is disabled on the computer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*/
public interface Netapi32 extends StdCallLibrary {

Netapi32 INSTANCE = Native.loadLibrary("Netapi32", Netapi32.class, W32APIOptions.DEFAULT_OPTIONS);
Netapi32 INSTANCE = Native.load("Netapi32", Netapi32.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* Retrieves join status information for the specified computer.
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/win32/NtDll.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
public interface NtDll extends StdCallLibrary {

NtDll INSTANCE = Native.loadLibrary("NtDll", NtDll.class, W32APIOptions.DEFAULT_OPTIONS);
NtDll INSTANCE = Native.load("NtDll", NtDll.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* The ZwQueryKey routine provides information about the class of a registry key,
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/win32/Ole32.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
public interface Ole32 extends StdCallLibrary {

/** The instance. */
Ole32 INSTANCE = Native.loadLibrary("Ole32", Ole32.class, W32APIOptions.DEFAULT_OPTIONS);
Ole32 INSTANCE = Native.load("Ole32", Ole32.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* Creates a GUID, a unique 128-bit integer used for CLSIDs and interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
*/
public interface OleAuto extends StdCallLibrary {
/** The instance. */
OleAuto INSTANCE = Native.loadLibrary("OleAut32", OleAuto.class, W32APIOptions.DEFAULT_OPTIONS);
OleAuto INSTANCE = Native.load("OleAut32", OleAuto.class, W32APIOptions.DEFAULT_OPTIONS);

/* Flags for IDispatch::Invoke */
/** The Constant DISPATCH_METHOD. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* opengl32.dll Interface.
*/
public interface OpenGL32 extends StdCallLibrary {
OpenGL32 INSTANCE = Native.loadLibrary("opengl32", OpenGL32.class);
OpenGL32 INSTANCE = Native.load("opengl32", OpenGL32.class);

/**
* The glGetString function returns a string describing the current OpenGL connection.
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/win32/Pdh.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* @see <A HREF="https://msdn.microsoft.com/en-us/library/windows/desktop/aa373083(v=vs.85).aspx">Performance Counters</A>
*/
public interface Pdh extends StdCallLibrary {
Pdh INSTANCE = Native.loadLibrary("Pdh", Pdh.class, W32APIOptions.DEFAULT_OPTIONS);
Pdh INSTANCE = Native.load("Pdh", Pdh.class, W32APIOptions.DEFAULT_OPTIONS);

/** Maximum counter name length. */
int PDH_MAX_COUNTER_NAME = 1024;
Expand Down
2 changes: 1 addition & 1 deletion contrib/platform/src/com/sun/jna/platform/win32/Psapi.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* @author Andreas "PAX" L&uuml;ck, onkelpax-git[at]yahoo.de
*/
public interface Psapi extends StdCallLibrary {
Psapi INSTANCE = Native.loadLibrary("psapi", Psapi.class, W32APIOptions.DEFAULT_OPTIONS);
Psapi INSTANCE = Native.load("psapi", Psapi.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* Retrieves the fully qualified path for the file containing the specified
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* Rasapi32.dll Interface.
*/
public interface Rasapi32 extends StdCallLibrary {
Rasapi32 INSTANCE = Native.loadLibrary("Rasapi32", Rasapi32.class, W32APIOptions.DEFAULT_OPTIONS);
Rasapi32 INSTANCE = Native.load("Rasapi32", Rasapi32.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* The RasDial function establishes a RAS connection between a RAS client and a RAS server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* @author dblock[at]dblock.org
*/
public interface Secur32 extends StdCallLibrary {
Secur32 INSTANCE = Native.loadLibrary("Secur32", Secur32.class, W32APIOptions.DEFAULT_OPTIONS);
Secur32 INSTANCE = Native.load("Secur32", Secur32.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* Specifies a format for a directory service object name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*/
public interface SetupApi extends StdCallLibrary {

SetupApi INSTANCE = Native.loadLibrary("setupapi", SetupApi.class, W32APIOptions.DEFAULT_OPTIONS);
SetupApi INSTANCE = Native.load("setupapi", SetupApi.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* The GUID_DEVINTERFACE_DISK device interface class is defined for hard disk storage devices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*/
public interface Shell32 extends ShellAPI, StdCallLibrary {
/** The instance **/
Shell32 INSTANCE = Native.loadLibrary("shell32", Shell32.class, W32APIOptions.DEFAULT_OPTIONS);
Shell32 INSTANCE = Native.load("shell32", Shell32.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* No dialog box confirming the deletion of the objects will be displayed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import com.sun.jna.platform.win32.WinNT.*;

public interface Shlwapi extends StdCallLibrary {
Shlwapi INSTANCE = Native.loadLibrary("Shlwapi", Shlwapi.class, W32APIOptions.DEFAULT_OPTIONS);
Shlwapi INSTANCE = Native.load("Shlwapi", Shlwapi.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* Takes an STRRET structure returned by IShellFolder::GetDisplayNameOf and returns a pointer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
public interface User32 extends StdCallLibrary, WinUser, WinNT {

/** The instance. */
User32 INSTANCE = Native.loadLibrary("user32", User32.class, W32APIOptions.DEFAULT_OPTIONS);
User32 INSTANCE = Native.load("user32", User32.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* Handle for message-only window.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
public interface Version extends StdCallLibrary {

Version INSTANCE = Native.loadLibrary("version", Version.class, W32APIOptions.DEFAULT_OPTIONS);
Version INSTANCE = Native.load("version", Version.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* Determines whether the operating system can retrieve version information for a specified file. If version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* @author Minoru Sakamoto
*/
public interface Wevtapi extends StdCallLibrary {
Wevtapi INSTANCE = (Wevtapi) Native.loadLibrary("wevtapi", Wevtapi.class, W32APIOptions.UNICODE_OPTIONS);
Wevtapi INSTANCE = (Wevtapi) Native.load("wevtapi", Wevtapi.class, W32APIOptions.UNICODE_OPTIONS);

/**
* Establishes a connection to a remote computer that you can use when calling the other Windows Event Log functions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public interface Wininet extends StdCallLibrary {
/**
* A usable instance of this interface
*/
Wininet INSTANCE = Native.loadLibrary("wininet", Wininet.class, W32APIOptions.DEFAULT_OPTIONS);
Wininet INSTANCE = Native.load("wininet", Wininet.class, W32APIOptions.DEFAULT_OPTIONS);

/**
* Normal cache entry; can be deleted to recover space for new entries.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

public interface Winsock2 extends Library {

Winsock2 INSTANCE = (Winsock2) Native.loadLibrary("ws2_32", Winsock2.class, W32APIOptions.ASCII_OPTIONS);
Winsock2 INSTANCE = (Winsock2) Native.load("ws2_32", Winsock2.class, W32APIOptions.ASCII_OPTIONS);

/**
* The gethostname function retrieves the standard host name for the local
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
*/
public interface Winspool extends StdCallLibrary {

Winspool INSTANCE = Native.loadLibrary("Winspool.drv", Winspool.class, W32APIOptions.DEFAULT_OPTIONS);
Winspool INSTANCE = Native.load("Winspool.drv", Winspool.class, W32APIOptions.DEFAULT_OPTIONS);

public static final int CCHDEVICENAME = 32;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

public interface Wtsapi32 extends StdCallLibrary {

Wtsapi32 INSTANCE = Native.loadLibrary("Wtsapi32", Wtsapi32.class, W32APIOptions.DEFAULT_OPTIONS);
Wtsapi32 INSTANCE = Native.load("Wtsapi32", Wtsapi32.class, W32APIOptions.DEFAULT_OPTIONS);

int NOTIFY_FOR_ALL_SESSIONS = 1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
*/
public interface CoreDLL extends WinNT, Library {

CoreDLL INSTANCE = Native.loadLibrary("coredll", CoreDLL.class, W32APIOptions.UNICODE_OPTIONS);
CoreDLL INSTANCE = Native.load("coredll", CoreDLL.class, W32APIOptions.UNICODE_OPTIONS);

}
2 changes: 1 addition & 1 deletion src/com/sun/jna/FunctionMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/** Provides mapping of Java method names to native function names.
* An instance of this interface may be provided to
* {@link Native#loadLibrary(String, Class, java.util.Map)} as an entry in
* {@link Native#load(String, Class, java.util.Map)} as an entry in
* the options map with key {@link Library#OPTION_FUNCTION_MAPPER}.
* <p>
* There are several circumstances where this option might prove useful.
Expand Down
2 changes: 1 addition & 1 deletion src/com/sun/jna/InvocationMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/** Provide a method for overriding how a given function is invoked.
* An instance of this interface may be provided to
* {@link Native#loadLibrary(String, Class, java.util.Map)} as an entry in
* {@link Native#load(String, Class, java.util.Map)} as an entry in
* the options map with key {@link Library#OPTION_INVOCATION_MAPPER}.<p>
* This is useful for implementing inlined functions, or functions which
* are actually C preprocessor macros. Given a native library and JNA
Expand Down
Loading

0 comments on commit d42375c

Please sign in to comment.