From: Danny <clarked@aston.ac.uk>
Subject: Ada address of operator?
Date: 1999/02/09
Date: 1999-02-09T00:00:00+00:00 [thread overview]
Message-ID: <36C02FFC.458368B1@aston.ac.uk> (raw)
Hi,
I'm trying to use a C library in an Ada function and a typical prototype
from this library would be
struct AType;
struct AnotherType;
int getObject( AType *pType, AnotherType **ppAnotherType );
I've imported the function okay and it is being called. The purpose of
the function is to use AType as an IN parameter and return a pointer to
AnotherType, which will be pointed to by ppAnotherType if you get what I
mean.
In Ada I have corresponding records for AType & AnotherType and have
declared AnotherTypePtr and AnotherTypePtrPtr. What I think I need to
do is
pAnotherType : AntherTypePtr;
ppAnotherType : AnotherTypePtrPtr;
but I need to assign ppAnotherType the address of pAnotherType, the
equivalent C code would be
AnotherType *pAnotherType;
AnotherType **ppAnotherType = &pAnotherType;
any suggestions?
-Danny
next reply other threads:[~1999-02-09 0:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-09 0:00 Danny [this message]
1999-02-09 0:00 ` Ada address of operator? Niklas Holsti
1999-02-10 0:00 ` Nick Roberts
1999-02-12 0:00 ` Nick Roberts
1999-02-11 0:00 ` Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox