From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc334b8912d9286c X-Google-Attributes: gid103376,public From: Samuel Tardieu Subject: Re: import a C function returning char * Date: 1999/02/03 Message-ID: <877ltzckn4.fsf@zaphod.enst.fr>#1/1 X-Deja-AN: 440301929 References: Mail-Copies-To: sam@ada.eu.org To: Stephen Leake X-Complaints-To: usenet@enst.enst.fr X-Trace: enst.enst.fr 918072704 5124 137.194.160.95 (3 Feb 1999 20:11:44 GMT) Organization: TELECOM Paris Mime-Version: 1.0 User-Agent: Gnus/5.070066 (Pterodactyl Gnus v0.66) XEmacs/21.2(beta3) (Aglaia) NNTP-Posting-Date: 3 Feb 1999 20:11:44 GMT Newsgroups: comp.lang.ada Date: 1999-02-03T20:11:44+00:00 List-Id: >>>>> "Stephen" == Stephen Leake 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