CNI namespace

Per Bothner per@bothner.com
Wed Mar 29 12:59:00 GMT 2000


Paul Fisher <pnfisher@redhat.com> writes:

> Has there been any thought into putting the CNI functions/datatypes
> into their own namespace?  And would anyone object to such a change?

It might make sense.  I'd like to see a more specific proposal.
However, note we do have a fair amount of existing code using the
JvXXX names.  Replacing JvXXX by (say) cni::XXX might be better C++
style, but is there enough of an advantage to make up for the work?

> I'm continuing the work on the C++ CNI->JNI translation layer, and
> such a change would create a cleaner solution to the problem of
> conflicting CNI and JNI types.

What is "the problem of conflicting CNI and JNI types"?

> Adding a CNI namespace would also allow the current name mangling to
> go away.

I'm not sure what is "the current name mangling".  We mangle
*Java* classes and methods, but using the same mangling as C++.
We don't want that to go away.  For CNI functions, some are
are extern "C" and some (by default) extern "C++".  We can make them
all extern "C", but I'm not sure how that would help.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/


More information about the Java mailing list