Visual Studio 2015 warning and test fixes

This commit is contained in:
Maksim Shabunin
2015-10-16 17:10:00 +03:00
parent 1648e9292c
commit 6e9d0d9a0c
54 changed files with 242 additions and 229 deletions

View File

@@ -1161,7 +1161,7 @@ class JavaWrapperGenerator(object):
("jdoubleArray _da_retval_ = env->NewDoubleArray(%(cnt)i); " +
"jdouble _tmp_retval_[%(cnt)i] = {%(args)s}; " +
"env->SetDoubleArrayRegion(_da_retval_, 0, %(cnt)i, _tmp_retval_);") %
{ "cnt" : len(fields), "args" : ", ".join(["_retval_" + f[1] for f in fields]) } )
{ "cnt" : len(fields), "args" : ", ".join(["(jdouble)_retval_" + f[1] for f in fields]) } )
if fi.classname and fi.ctype and not fi.static: # non-static class method except c-tor
# adding 'self'
jn_args.append ( ArgInfo([ "__int64", "nativeObj", "", [], "" ]) )
@@ -1208,7 +1208,7 @@ class JavaWrapperGenerator(object):
j_prologue.append( "double[] %s_out = new double[%i];" % (a.name, len(fields)) )
c_epilogue.append( \
"jdouble tmp_%(n)s[%(cnt)i] = {%(args)s}; env->SetDoubleArrayRegion(%(n)s_out, 0, %(cnt)i, tmp_%(n)s);" %
{ "n" : a.name, "cnt" : len(fields), "args" : ", ".join([a.name + f[1] for f in fields]) } )
{ "n" : a.name, "cnt" : len(fields), "args" : ", ".join(["(jdouble)" + a.name + f[1] for f in fields]) } )
if a.ctype in ('bool', 'int', 'long', 'float', 'double'):
j_epilogue.append('if(%(n)s!=null) %(n)s[0] = (%(t)s)%(n)s_out[0];' % {'n':a.name,'t':a.ctype})
else: