This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: namespace namespace


Andrew Haley wrote:
Sam Ruby wrote:
Andrew Haley wrote:
Sam Ruby wrote:
Bryce McKinlay wrote:
On Tue, Jun 23, 2009 at 10:39 AM, Chris Burdess<dog@bluezoo.org> wrote:

Some genius (?) has a namespace called "namespace" :-)
That would be Sun. And in Java "namespace" is not a keyword so it's a
perfectly legal package name.
namespace also happens to be the name of a concept in XML...

I think you'll have to edit the header file by hand.
To what? Specifically, what should namespace "namespace" be mapped to?
namespace$

It is beginning to appear to me that gcj/g++ will do name mangling of
Java packages without regard to C++ reserved words, resulting in entry
points that can't conveniently be referenced in C++ using CNI.
That's right. It should be fairly easy to fix this, though.
Just so that I'm clear: what you are saying is that *both* gcj/g++ and
gcjh need to be fixed.

If you want to be able to access namespace namespace from CNI, yes.


I believe that doing such, while necessary, would break the binary
interface: in particular code which is compiled today to call into JAXP
would not work with new versions of JAXP that are compiled with a
version of gcj/g++ which has this fix.

Is that OK?

Yes.


Where can I find the "old" gcjh?  The current code is in Java, which
presumably does *not* have the mapping:

http://cvs.savannah.gnu.org/viewvc/classpath/tools/gnu/classpath/tools/javah/?root=classpath
But this is easily fixable, as I pointed out in my previous massage.

The old gcjh is very out of date. I'd just fix the current code.
Is that "I'd" or "I'll" :-)

I'd.

OK, so you would. The next question is who will?


Is there something more I can provide? Will gcj/g++ also be fixed?

Well, I already suggested how you might fix gcjh. It's a matter of whether you want to be able to access namespace namespace from CNI or merely not have header files that choke C++. Why not try the fix?

For the moment, I'm doing the equivalent of sed scripts to post process the header files (actually, I'm using Ruby -pi -e).


I can certainly fix gcjh locally, but I want to share my results with others, and ultimately the fix should go into cvs. I'm certainly willing to do my share of the work, but you already identified the actual fix. What's the next step?

Do you really need CNI access to namespace namespace ?

What I am working on is the a Ruby extension that calls out to a HTML 5 parser that happens to be written in Java and exposes a JAXP interface. Along the way, I will have a need to create and access, via CNI, objects of the type javax::xml::namespace::QName. I didn't create that class, nor can I change it.


http://intertwingly.net/blog/2009/06/23/Validator-Nu-on-GCJ-Update

Andrew.

- Sam Ruby



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]