CNI namespace

Per Bothner
Wed Mar 29 15:50:00 GMT 2000

Paul Fisher <> writes:

> > What is "the problem of conflicting CNI and JNI types"?
> I'm working on code that needs to manipulate CNI and JNI types at the
> same time.  Both CNI and JNI stick conflicting typedefs into the
> global namespace.  For instance, a CNI jarray is quite different from
> a JNI jarray.

How?  A JNI jarray is typedef to an unspecified pointer type.
A CNI jarray is a typedef to a specific pointer type.
I see no reason why the former can't be the same as the latter.

> With a namespace, ::jarray can easily be used to refer
> to the JNI type, and the CNI jarrary can be referred to as
> cni::jarray, or, assuming that the cni namespace is `in use', just
> jarrary.

So why can't these be the same type?  That was the plan.
	--Per Bothner

More information about the Java mailing list