Storing C++ data in an instance field using CNI?

Paul Gear paul@gear.dyndns.org
Mon May 24 21:58:00 GMT 2004


Bryce McKinlay wrote:
> On May 24, 2004, at 8:06 AM, Paul Gear wrote:
>>> I've searched the archives & Google without finding an answer to this
>> question: is it possible using CNI to store C++ data in the object as an
>> instance field?
>>> You can do this with the RawData type. See:
>> http://gcc.gnu.org/onlinedocs/gcj/Mixing-with-C--.html

Bewdy. Thanks for all your responses. Dunno how i missed that one.
One more question: I notice in the examples that the field is defined in
the C++ source instead of the Java source. Is this the recommended best
practice, or is it simply up to personal preference? My natural
inclination is to put as much as possible in the Java source and write
only the parts actually required in C++.
BTW, thanks to all the developers who've contributed to such a simple,
easy-to-work-with compiler environment. Coding with GCJ is almost too
easy - the code virtually writes itself, and some of my modules even
compile & run correctly first time! Scary. ;-)
Thanks again,
Paul
http://paulgear.webhop.net
-- 
Think context! Using accepted quoting conventions makes
your email easier to understand. Learn how at
<http://www.netmeister.org/news/learn2quote.html>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://gcc.gnu.org/pipermail/java/attachments/20040524/16ac9aac/attachment.sig>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /