Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > 54478070873cb3561313a8ca8515b5f9 > files > 3

octave-forge-20090607-5mdv2010.1.src.rpm

--- extra/java-1.2.6/src/__java__.cc	2009/08/15 18:44:39	6097
+++ extra/java-1.2.6/src/__java__.cc	2009/08/16 14:24:11	6098
@@ -31,6 +31,7 @@
 
 #include <algorithm>
 #include <map>
+#include <iostream>
 #include <fstream>
 
 typedef jint (JNICALL *JNI_CreateJavaVM_t) (JavaVM **pvm, JNIEnv **penv, void *args);
@@ -584,9 +585,9 @@
       idx_vector v = idx(i).index_vector ();
       if (! error_state)
         {
-          jintArray_ref i_array (jni_env, jni_env->NewIntArray (v.capacity ()));
+          jintArray_ref i_array (jni_env, jni_env->NewIntArray (v.length ()));
           jint *buf = jni_env->GetIntArrayElements (i_array, 0);
-          for (int k=0; k<v.capacity (); k++)
+          for (int k=0; k<v.length (); k++)
             buf[k] = v(k);
           jni_env->ReleaseIntArrayElements (i_array, buf, 0);
           jni_env->SetObjectArrayElement (retval, i, i_array);
@@ -676,7 +677,7 @@
   }
 
   string_vector v (name_list);
-  return v.qsort (true);
+  return v.sort (true);
 }
 
 static octave_value convert_to_string (JNIEnv *jni_env, jobject java_object, bool force, char type)