From: Ted Dennison<dennison@telepath.com>
Subject: Re: Interfacing with C++
Date: Thu, 21 Jun 2001 20:44:22 GMT
Date: 2001-06-21T20:44:22+00:00 [thread overview]
Message-ID: <F0tY6.4288$yp1.161085@www.newsranger.com> (raw)
In-Reply-To: mailman.993155362.16396.comp.lang.ada@ada.eu.org
In article <mailman.993155362.16396.comp.lang.ada@ada.eu.org>, Hagi Yilmaz
says...
>I have a little problem in Mapping C++, char * to Ada 95
>c.strings_chars_ptr.
>
>extern "C" {void ada_call (char *x) }; // ada function I call.
>in ada code :
> procedure ada_call(x : in out c.strings_chars_ptr) is
That's wrong. Read your Ada references (prefereably the LRM) a bit more
carefully. What you are saying with "in out c.strings_chars_ptr" is that the
program is allowed to update the value of the pointer. In order to do that in C,
you'd need a "char **" parameter.
You are going to need to either change the C side to "char **", or the Ada side
to something like C.Chars_Array or mode "in", depending on what you really want
to do with the parameter.
---
T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
home email - mailto:dennison@telepath.com
next prev parent reply other threads:[~2001-06-21 20:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-21 20:28 Interfacing with C++ Hagi Yilmaz
2001-06-21 20:44 ` Ted Dennison [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-10-10 20:01 Hagi Yilmaz
2001-10-11 11:06 ` Peter Hend�n
[not found] <F2728u4xIt1YtxQEfQm00001bff@hotmail.com>
2001-10-11 11:37 ` David Botton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox