From: Geoffrey F. <fu...@us...> - 2001-08-23 18:09:15
|
Update of /cvsroot/plplot/plplot/bindings/java In directory usw-pr-cvs1:/tmp/cvs-serv7485/bindings/java Modified Files: PLStream.java javabind.c Log Message: Reworked to get the stream association business done right. Now PLStream's ctor calls mkstrm(), a private native method. mkstrm() invokes plmkstrm() and returns the resulting stream id, which PLStream stores in its stream_id member. But mkstrm() also does the JNI hocus pocus to cache the stream_id field id. Since mkstrm() is called by the PLStream ctor, we know it will be the first JNI wrapper invoked, making it safe to do the global ref fetching mumbo jumbo there. Now all API wrappers, including init(), proceed by fetching the stream_id from the PLStream class, setting the PLplot stream, and invoking their corresponding API function. |