Java director typemaps and test tweak

- Fix java_director_typemaps test name clash ensuring parallel tests work
- Replace assert with code that is guaranteed to run
- Nicer generated code from directorargout typemap
This commit is contained in:
William S Fulton 2017-01-24 20:04:20 +00:00
commit 8a4ab380a1
5 changed files with 58 additions and 55 deletions

View file

@ -1366,9 +1366,8 @@ SWIG_PROXY_CONSTRUCTOR(true, true, SWIGTYPE)
}
Swig::LocalRefGuard $1_refguard(jenv, $input);
}
%typemap(directorargout) (char *STRING, size_t LENGTH) {
if ($input && $1) (jenv)->GetByteArrayRegion($input, 0, (jsize)$2, (jbyte *)$1);
}
%typemap(directorargout, noblock=1) (char *STRING, size_t LENGTH)
{ if ($input && $1) JCALL4(GetByteArrayRegion, jenv, $input, 0, (jsize)$2, (jbyte *)$1); }
%typemap(javadirectorin, descriptor="[B") (char *STRING, size_t LENGTH) "$jniinput"
%apply (char *STRING, size_t LENGTH) { (char *STRING, int LENGTH) }