comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Ada to C Interface: Passing Pointers Via System.Address
Date: Wed, 12 Jan 2005 02:38:03 -0600
Date: 2005-01-12T02:38:03-06:00	[thread overview]
Message-ID: <hPCdnS-Jg6d2fHncRVn-3w@comcast.com> (raw)
In-Reply-To: 70b31062323c157bbc6b42ccd0ca0945@localhost.talkaboutprogramming.com

> struct_ptr : system.address;
>
> struct_ptr := ada_cfunct1(input1, input2);
>
> cfunct2(struct_ptr, input3);
> ...
> at the value of the memory of the struct_ptr after it has gone to ada and
> back to c it says that it is null.  I must not be using the system.address
  Could you please post a small, but complete (ie, compiles, but fails to
run) program?  I'm very confused by the above, not knowing which of the
functions are in Ada, which are imported from C, how is struct_ptr's value
created, what are the declarations of ada_cfunct1 and cfunct2, etc.  I'm
guessing that both ada_cfunct1 and cfunct2 are imported C functions.  How
about putting printout inside ada_cfunct1 just before it returns
struct_ptr, another printout just after the "struct_ptr := ...", and a
third printout at the beginning of cfunct2, showing the value passed in
for struct_ptr.



  reply	other threads:[~2005-01-12  8:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-12  2:16 Ada to C Interface: Passing Pointers Via System.Address ReversedBias
2005-01-12  3:09 ` tmoran
2005-01-12  7:36   ` ReversedBias
2005-01-12  8:38     ` tmoran [this message]
2005-01-12 15:50       ` Mark Lorenzen
2005-01-13 17:14   ` Martin Krischik
2005-01-13  1:25 ` Jeffrey Carter
2005-01-13  3:05 ` Steve
replies disabled

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