/[libvob]/libvob/include/vob/jni/Types.hxx
ViewVC logotype

Diff of /libvob/include/vob/jni/Types.hxx

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

revision 1.28 by tjl, Mon Aug 4 07:57:56 2003 UTC revision 1.29 by mudyc, Mon Aug 4 13:47:50 2003 UTC
# Line 100  namespace JNI { Line 100  namespace JNI {
100      // Only TexAccum_JNI objects will be stored here      // Only TexAccum_JNI objects will be stored here
101      extern ObjectStorer<Stats::TexAccum> texaccums;      extern ObjectStorer<Stats::TexAccum> texaccums;
102    
   
103      typedef ::Vob::Paper::Paper P; // g++3.2 doesn't like ::... inside      typedef ::Vob::Paper::Paper P; // g++3.2 doesn't like ::... inside
104                                     // template param                                     // template param
105      extern ObjectStorer<P> papers;      extern ObjectStorer<P> papers;
# Line 233  namespace JNI { Line 232  namespace JNI {
232          out = jstr2stdstr(env, in);          out = jstr2stdstr(env, in);
233      END_VOB_JNI_CONVERSION      END_VOB_JNI_CONVERSION
234    
235      START_VOB_JNI_CONVERSION(float *, "float []", jfloatArray)      START_VOB_JNI_CONVERSION(std::vector<float>, "float []", jfloatArray)
236        out = env->GetFloatArrayElements(in, 0);        jsize len = env->GetArrayLength(in);
237          int i = 0;
238          std::vector<float> floats;
239          jfloat *f = env->GetFloatArrayElements(in, 0);
240          for (i=0; i<len; i++) {
241            floats.push_back(f[i]);
242          }
243          env->ReleaseFloatArrayElements(in, f, 0);
244          out = floats;
245      END_VOB_JNI_CONVERSION      END_VOB_JNI_CONVERSION
246    
247    

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