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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ef6c792702c0ff46 X-Google-Attributes: gid103376,public From: Al Johnston Subject: Re: ada to c interfaces and CHARS_PTR Date: 2000/03/09 Message-ID: <38C849F2.6AA7084D@mindspring.com>#1/1 X-Deja-AN: 595414597 Content-Transfer-Encoding: 7bit References: <38C7E515.29C42580@mindspring.com> X-Accept-Language: en X-Server-Date: 10 Mar 2000 01:05:50 GMT Content-Type: text/plain; charset=us-ascii Organization: MindSpring Enterprises Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-03-10T01:05:50+00:00 List-Id: > Check PGAda at http://www.infres.enst.fr/ANC/ Thanks... I did... but it hasn't help much. You (they?) show a binding for a procedure that uses chars_ptr as a formal parameter, but the is no c code to show me what should be done on the "callie" side. Thinking that even I could get that to work I did the following: procedure foo( bar : chars_ptr); pragma import(c,foo,"foo") and foo(my_chars_ptr); on the ada side, where my_chars_ptr : chars_ptr which was initialized by the appropriate routine. on the c side I did void foo(char *bar) and had the foo routine copy bar to a local array and then print it out. running the routine results in the expected behavior for the c routine, but as it is returning to the ada caller the program cores... Am I an idiot or is something screwy... okay... so I am an idiot... arrrrrrrg.....somebody give me a hand with this..... I am running gnat 3.12 on a x86 box running rh linux 6.1