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,8e0cb57b5e30a8be X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!wns14feed!worldnet.att.net!attbi_s71.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Java wrappers around Ada? References: <1143032491.488772.259820@j33g2000cwa.googlegroups.com> <44231f6e$1_1@newsfeed.slurp.net> <1143154793.188596.117060@j33g2000cwa.googlegroups.com> <442466a1_1@newsfeed.slurp.net> In-Reply-To: <442466a1_1@newsfeed.slurp.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <2h0Vf.47877$oL.14733@attbi_s71> NNTP-Posting-Host: 12.214.35.215 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s71 1143247038 12.214.35.215 (Sat, 25 Mar 2006 00:37:18 GMT) NNTP-Posting-Date: Sat, 25 Mar 2006 00:37:18 GMT Date: Sat, 25 Mar 2006 00:37:18 GMT Xref: g2news1.google.com comp.lang.ada:3596 Date: 2006-03-25T00:37:18+00:00 List-Id: James Alan Farrell wrote: > On the C side things are a bit messy. Out and in/out parameters become > pointers. This works rather better than I would've thought (probably > the pragma forces such parameters to be pointers where they would not > always be otherwise). But even so, we have a lot of C functions with > void * parameters instead of typed pointers and ints instead of Boolean, > etc. ARM B.3 defines how parameters should be passed to a convention-C subprogram. > One interesting problem we had was converting Ada access types to C > pointers. An Ada access type is a higher level construct than a C > pointer, which means it may or might not actually "point" to the desired > location in memory. What we found in practice is that arrays that are > sized dynamically have a 64 bit entity in which the first 32 bits do > point to the object of interest. You can apply pragma Convention (C, ...); to an Ada access type to ensure that it is C compatible. -- Jeff Carter "Ditto, you provincial putz?" Blazing Saddles 86