From: <gof...@us...> - 2009-08-16 14:24:22
|
Revision: 6098 http://octave.svn.sourceforge.net/octave/?rev=6098&view=rev Author: goffioul Date: 2009-08-16 14:24:11 +0000 (Sun, 16 Aug 2009) Log Message: ----------- Fix compilation with octave >= 3.1.x Modified Paths: -------------- trunk/octave-forge/extra/java/src/__java__.cc Modified: trunk/octave-forge/extra/java/src/__java__.cc =================================================================== --- trunk/octave-forge/extra/java/src/__java__.cc 2009-08-15 18:44:39 UTC (rev 6097) +++ trunk/octave-forge/extra/java/src/__java__.cc 2009-08-16 14:24:11 UTC (rev 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) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |