This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/18115] New: JNI nio buffer functions only work with byte buffers


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]