3 messages in net.java.dev.jna.usersRe: [jna-users] Re: symbol lookup err...
FromSent OnAttachments
Timothy WallAug 27, 2007 12:24 pm 
Ross BagleyAug 28, 2007 12:06 pm 
Timothy WallAug 28, 2007 12:36 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Re: symbol lookup error during jna startupActions...
From:Timothy Wall (twal@dev.java.net)
Date:Aug 28, 2007 12:36:24 pm
List:net.java.dev.jna.users

On Aug 28, 2007, at 3:06 PM, Ross Bagley wrote:

That doesn't quite work as expected.

short MASK = 0x8000;

yields a "possible loss of precision" error, which was my original problem with the octal representation in the original library interface.

If I do an explicit cast to short (yuck):

public static final short MASK = (short) 0x8000;

Numeric literals default to "int", so anything smaller requires a cast. Unfortunately, there's no such thing as a short or byte literal, so you'll get the loss of precision error whenever the high bit is set.