From: Samuel Tardieu <sam@ada.eu.org>
To: Stephen Leake <Stephen.Leake@gsfc.nasa.gov>
Subject: Re: import a C function returning char *
Date: 1999/02/03
Date: 1999-02-03T20:11:44+00:00 [thread overview]
Message-ID: <877ltzckn4.fsf@zaphod.enst.fr> (raw)
In-Reply-To: ud83r4c6w.fsf@gsfc.nasa.gov
>>>>> "Stephen" == Stephen Leake <Stephen.Leake@gsfc.nasa.gov> writes:
Stephen> Is this going to work (I'll get around to compiling this
Stephen> soon)? I'm using GNAT 3.11p and ObjectAda 7.12 on Windows NT;
Stephen> what about other Ada compilers?
What do you think "Sbs_Read_Error'Length" would contain? You can't tell?
Neither can the compiler :-)
Use Interfaces.C.Strings.chars_ptr, since what you get from this C
function is only a pointer onto the beginning of the string (char *),
don't expect to get more just by writing it in Ada :-)
Sam
--
Samuel Tardieu -- sam@ada.eu.org
next prev parent reply other threads:[~1999-02-03 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-03 0:00 import a C function returning char * Stephen Leake
1999-02-03 0:00 ` Tucker Taft
1999-02-03 0:00 ` Samuel Tardieu [this message]
1999-02-04 0:00 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox