/[libvob]/libvob/src/jni/Main.cxx
ViewVC logotype

Diff of /libvob/src/jni/Main.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.28 by tjl, Sat Oct 18 06:11:15 2003 UTC revision 1.29 by tjl, Wed Oct 22 08:57:48 2003 UTC
# Line 548  jf(jbyteArray, impl_1ByteVector_1get__I) Line 548  jf(jbyteArray, impl_1ByteVector_1get__I)
548      return arr;      return arr;
549  }  }
550    
551    jf(void, impl_1ByteVector_1set)
552      (JNIEnv *env, jclass, jint id, jbyteArray array) {
553          jbyte *bytes = env->GetByteArrayElements(array, 0);
554          ByteVector *v = bytevectors[id];
555    
556          unsigned len = env->GetArrayLength(array);
557          if(len > v->size()) len = v->size();
558    
559          for(int i=0; i<len; i++)
560              (*v)[i] = bytes[i];
561          
562          env->ReleaseByteArrayElements(array, bytes, 0);
563    }
564    
565  jf(jintArray, impl_1ByteVector_1getInts)  jf(jintArray, impl_1ByteVector_1getInts)
566    (JNIEnv *env, jclass, jint id) {    (JNIEnv *env, jclass, jint id) {
567      int len = bytevectors[id]->size() / 4;      int len = bytevectors[id]->size() / 4;

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26