comp.lang.ada
 help / color / mirror / Atom feed
From: Al Johnston <sofeise@mindspring.com>
Subject: Re: ada to c interfaces and CHARS_PTR
Date: 2000/03/09
Date: 2000-03-10T01:05:50+00:00	[thread overview]
Message-ID: <38C849F2.6AA7084D@mindspring.com> (raw)
In-Reply-To: slrn8cg095.1p1.randhol@kiuk0156.chembio.ntnu.no

> 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






  reply	other threads:[~2000-03-09  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-09  0:00 ada to c interfaces and CHARS_PTR Al Johnston
2000-03-09  0:00 ` Gisle S�lensminde
2000-03-09  0:00   ` Al Johnston
2000-03-13  0:00     ` Robert Dewar
2000-03-15  0:00       ` Al Johnston
2000-03-11  0:00   ` Simon Wright
2000-03-14  0:00     ` Al Johnston
2000-03-15  0:00       ` tmoran
2000-03-15  0:00         ` Al Johnston
2000-03-15  0:00       ` Robert Dewar
2000-03-09  0:00 ` Preben Randhol
2000-03-09  0:00   ` Al Johnston [this message]
2000-03-10  0:00 ` tmoran
2000-03-10  0:00   ` Al Johnston
2000-03-10  0:00 ` Al Johnston
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox