This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/18115] New: JNI nio buffer functions only work with byte buffers
- From: "juhal at users dot sourceforge dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Oct 2004 19:52:18 -0000
- Subject: [Bug libgcj/18115] New: JNI nio buffer functions only work with byte buffers
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following does not work properly:
Java:
ByteBuffer directByteBuffer = ByteBuffer.allocateDirect(10);
IntBuffer directIntBuffer = directByteBuffer.asIntBuffer();
JNI:
(*env)->GetDirectBufferAddress(env, directIntBuffer);
The reason for the failure is that GetDirectBufferAddress expects that the
buffer is an instance of DirectByteBufferImpl, when in this case it is actually
an instance of IntViewBufferImpl containing directByteBuffer.
--
Summary: JNI nio buffer functions only work with byte buffers
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: juhal at users dot sourceforge dot net
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org,konqueror at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18115