This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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]

[Patch] JNI support for direct buffers


Hi list,


I wrote the attached patch to fix the handling of direct buffers when
using the JNI methods NewDirectByteBuffer, GetDirectBufferAddress and
GetDirectBufferLength.

OK to commit to trunk ?


Michael


2005-01-06  Michael Koch  <konqueror@gmx.de>

	* java/nio/Buffer.java
	(address): New field.
	* java/nio/DirectByteBufferImpl.java
	(address): Removed.
	* java/nio/MappedByteBufferImpl.java
	(address): Likewise..
	* java/nio/CharViewBufferImpl.java
	(CharViewBufferImpl): Explicitely initialize Buffer.address if needed.
	* java/nio/DoubleViewBufferImpl.java
	(DoubleViewBufferImpl): Likewise.
	* java/nio/FloatViewBufferImpl.java
	(FloatViewBufferImpl): Likewise.
	* java/nio/IntViewBufferImpl.java
	(IntViewBufferImpl): Likewise.
	* java/nio/LongViewBufferImpl.java
	(LongViewBufferImpl): Likewise.
	* java/nio/ShortViewBufferImpl.java
	(ShortViewBufferImpl): Likewise.
	* testsuite/libjava.jni/directbuffer.c,
	testsuite/libjava.jni/directbuffer.java,
	testsuite/libjava.jni/directbuffer.out: New files.

Attachment: direct.diff
Description: Text document


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