From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,74885c423a23a03e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!14g2000cws.googlegroups.com!not-for-mail From: rodkay@dodo.com.au Newsgroups: comp.lang.ada Subject: Re: C to Ada Date: 25 Nov 2006 15:52:47 -0800 Organization: http://groups.google.com Message-ID: <1164498767.618164.197920@14g2000cws.googlegroups.com> References: <1164335326.802553.87760@h54g2000cwb.googlegroups.com> NNTP-Posting-Host: 58.163.88.116 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1164498773 19913 127.0.0.1 (25 Nov 2006 23:52:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 25 Nov 2006 23:52:53 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/48 (like Gecko) Safari/48,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 14g2000cws.googlegroups.com; posting-host=58.163.88.116; posting-account=566NuA0AAAD7iWzPbtXulrcGbAD2wGwm Xref: g2news2.google.com comp.lang.ada:7697 Date: 2006-11-25T15:52:47-08:00 List-Id: Brian May wrote: > >>>>> "rodkay" == rodkay writes: > > rodkay> These attempt to generate Ada bindings to both C and > rodkay> C++ libraries. The 'ada' module is for any Ada compiler, > rodkay> and produces bindings based on a 'proxy' approach. The > rodkay> 'gnat' compiler targets the GNAT family of compilers, and > rodkay> produces Ada types and objects which are the binary > rodkay> equivalent of their corresponding C/C++ types. > > I am still not clear on the difference - what is the 'proxy' approach? With the 'proxy' approach, the Ada type holds only a pointer to the wrapped C++ object. When an object of the the Ada type is constructed, a corresponding C++ object is created, and its pointer stored in the Ada type object. All operations on the Ada object are then relayed to its internal C++ object. The 'gnat' binary approach produces an Ada record layout which is equivalent to the C++ class layout. Operations act directly on the Ada object. > Can I assume that the GNAT target uses GNAT specific features and > won't work without GNAT?? Yes, the 'gnat' SWIG module produces bindings which require a GNAT compiler. Perhaps a similar approach (binary-compatible) for other compilers might be attempted, after the existing modules have matured a little more.