[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JNI/CNI Revisited

From: Tom Tromey
Subject: Re: JNI/CNI Revisited
Date: 01 Mar 2003 13:22:20 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Aaron> Right now Classpath just hardcodes these as FD 0, 1, and 2.
Aaron> Probably not a good idea.  The nativeInit() method was one I
Aaron> envisioned being called as part of static initialization a la
Aaron> gcj, and thus it could set up these values.

Tom> For some reason I assumed your `nativeInit' method had to do with
Tom> initializing an instance -- but of course open() can be used for that.

Though looking yet again at the libgcj FileDescriptor, I see this:

  private int fd = -1;

If we have a nativeValid method, we also need a native way to compute
the value for an invalid fd.  We need this since there is a public
FileDescriptor constructor which creates an `invalid' instance.  So,
add something like:

  static native long nativeGetInvalidDescriptor();


reply via email to

[Prev in Thread] Current Thread [Next in Thread]