|
From: <ai...@us...> - 2009-07-19 17:30:28
|
Revision: 10162
http://plplot.svn.sourceforge.net/plplot/?rev=10162&view=rev
Author: airwin
Date: 2009-07-19 17:30:25 +0000 (Sun, 19 Jul 2009)
Log Message:
-----------
Apply simple patch submitted by anonymous user at
https://sourceforge.net/tracker/?func=detail&atid=102915&aid=2823751&group_id=2915.
This fix moves the jadat declaration to the top of the function which
apparently allows the generated source code to compile under msvc.
Modified Paths:
--------------
trunk/bindings/java/plplotjavac.i
Modified: trunk/bindings/java/plplotjavac.i
===================================================================
--- trunk/bindings/java/plplotjavac.i 2009-07-19 01:59:08 UTC (rev 10161)
+++ trunk/bindings/java/plplotjavac.i 2009-07-19 17:30:25 UTC (rev 10162)
@@ -259,9 +259,10 @@
/* Create a jdoubleArray and fill it from the C PLFLT array dat */
static jdoubleArray
-setup_java_array_1d_PLFLT( JNIEnv *jenv, PLFLT *dat, PLINT n)
+setup_java_array_1d_PLFLT( JNIEnv *jenv, PLFLT *dat, PLINT n)
{
double *x;
+ jdoubleArray jadat;
#ifdef PL_DOUBLE
x = (double *) dat;
#else
@@ -270,7 +271,7 @@
x[i] = (double) dat[i];
}
#endif
- jdoubleArray jadat = (*jenv)->NewDoubleArray(jenv, n);
+ jadat = (*jenv)->NewDoubleArray(jenv, n);
(*jenv)->SetDoubleArrayRegion(jenv, jadat, 0, n, x);
#ifndef PL_DOUBLE
free(x);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|