From: Calixte DENIZET Date: Tue, 1 Oct 2013 12:44:43 +0000 (+0200) Subject: JIMS: forgot jchar unwrappers X-Git-Tag: 5.5.0-beta-1~4 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=1fd911a49f77498f78f5cae9146a256c466680bf JIMS: forgot jchar unwrappers Change-Id: If4d23f475ac51a787e14a5fdd4484b29a632dc48 --- diff --git a/scilab/modules/external_objects_java/src/cpp/ScilabJavaEnvironmentWrapper.cpp b/scilab/modules/external_objects_java/src/cpp/ScilabJavaEnvironmentWrapper.cpp index abbfea3..7ddf685 100644 --- a/scilab/modules/external_objects_java/src/cpp/ScilabJavaEnvironmentWrapper.cpp +++ b/scilab/modules/external_objects_java/src/cpp/ScilabJavaEnvironmentWrapper.cpp @@ -498,17 +498,20 @@ void ScilabJavaEnvironmentWrapper::unwrapmatshort(int id, const ScilabShortStack void ScilabJavaEnvironmentWrapper::unwrapushort(int id, const ScilabUShortStackAllocator & allocator) const { - // Not called + JavaVM * vm = getScilabJavaVM(); + unwrapSingle(vm, id, allocator); } void ScilabJavaEnvironmentWrapper::unwraprowushort(int id, const ScilabUShortStackAllocator & allocator) const { - // Not called + JavaVM * vm = getScilabJavaVM(); + unwrapRow(vm, id, allocator); } void ScilabJavaEnvironmentWrapper::unwrapmatushort(int id, const ScilabUShortStackAllocator & allocator) const { - // Not called + JavaVM * vm = getScilabJavaVM(); + unwrapMat(vm, id, allocator); } void ScilabJavaEnvironmentWrapper::unwrapint(int id, const ScilabIntStackAllocator & allocator) const diff --git a/scilab/modules/external_objects_java/src/cpp/ScilabJavaEnvironmentWrapper.hxx b/scilab/modules/external_objects_java/src/cpp/ScilabJavaEnvironmentWrapper.hxx index e674c4b..03c6d07 100644 --- a/scilab/modules/external_objects_java/src/cpp/ScilabJavaEnvironmentWrapper.hxx +++ b/scilab/modules/external_objects_java/src/cpp/ScilabJavaEnvironmentWrapper.hxx @@ -79,6 +79,10 @@ class ScilabJavaEnvironmentWrapper : public ScilabAbstractEnvironmentWrapper jmethodID unwrapRowFloatID_; jmethodID unwrapMatFloatID_; + jmethodID unwrapCharID_; + jmethodID unwrapRowCharID_; + jmethodID unwrapMatCharID_; + jmethodID wrapAsDirectByteBufferID_; jmethodID wrapAsDirectDoubleBufferID_; jmethodID wrapAsDirectIntBufferID_; @@ -129,6 +133,10 @@ public: unwrapRowFloatID_ = curEnv->GetStaticMethodID(ScilabJavaObjectClass_, "unwrapRowFloat", "(I)Ljava/lang/Object;"); unwrapMatFloatID_ = curEnv->GetStaticMethodID(ScilabJavaObjectClass_, "unwrapMatFloat", "(I)[[F"); + unwrapCharID_ = curEnv->GetStaticMethodID(ScilabJavaObjectClass_, "unwrapChar", "(I)C"); + unwrapRowCharID_ = curEnv->GetStaticMethodID(ScilabJavaObjectClass_, "unwrapRowChar", "(I)Ljava/lang/Object;"); + unwrapMatCharID_ = curEnv->GetStaticMethodID(ScilabJavaObjectClass_, "unwrapMatChar", "(I)[[C"); + wrapAsDirectByteBufferID_ = curEnv->GetStaticMethodID(ScilabJavaObjectClass_, "wrapAsDirectByteBuffer", "(Ljava/nio/ByteBuffer;)I"); wrapAsDirectDoubleBufferID_ = curEnv->GetStaticMethodID(ScilabJavaObjectClass_, "wrapAsDirectDoubleBuffer", "(Ljava/nio/ByteBuffer;)I"); wrapAsDirectIntBufferID_ = curEnv->GetStaticMethodID(ScilabJavaObjectClass_, "wrapAsDirectIntBuffer", "(Ljava/nio/ByteBuffer;)I"); @@ -432,7 +440,7 @@ private: } inline const jmethodID getSingleMethod(const unsigned short * x) const { - return unwrapShortID_; + return unwrapCharID_; } inline const jmethodID getSingleMethod(const int * x) const { @@ -465,7 +473,7 @@ private: } inline const jmethodID getRowMethod(const unsigned short * x) const { - return unwrapRowShortID_; + return unwrapRowCharID_; } inline const jmethodID getRowMethod(const int * x) const { @@ -498,7 +506,7 @@ private: } inline const jmethodID getMatMethod(const unsigned short * x) const { - return unwrapMatShortID_; + return unwrapMatCharID_; } inline const jmethodID getMatMethod(const int * x) const {