From: "Matthew Heaney" <mheaney@banet.net>
Subject: Re: Strange problem
Date: 2000/01/04
Date: 2000-01-04T00:00:00+00:00 [thread overview]
Message-ID: <387271e1_1@news1.prserv.net> (raw)
In-Reply-To: 946581540.11snx@jvdsys.stuyts.nl
In article <946581540.11snx@jvdsys.stuyts.nl> , jerry@jvdsys.stuyts.nl
(Jerry van Dijk) wrote:
> In article <vhi3dsodsya.fsf@grotte.ifi.uio.no> jankr@nntp.ifi.uio.no writes:
>
> Ada:
>
> with Interfaces.C.Strings;
>
> procedure Demo is ...
Here's an alternative implementation that does not require the use of
heap:
with Interfaces.C;
procedure Demo is
package C renames Interfaces.C;
use type C.size_t;
procedure C_Func (s : C.char_array; len : C.size_t);
pragma Import (C, C_Func, "c_func");
Str : constant C.char_array := C.To_C ("Hello, world!");
begin
C_Func (Str, Str'Length - 1);
end Demo;
prev parent reply other threads:[~2000-01-04 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <vhi3dsodsya.fsf@grotte.ifi.uio.no>
1999-12-30 0:00 ` Strange problem Jerry van Dijk
2000-01-04 0:00 ` Matthew Heaney [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox