From: Jeffrey Carter <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Passing a String to a C/C++ Subprogram (Special Case)
Date: Tue, 15 Oct 2013 17:00:12 -0700
Date: 2013-10-15T17:00:12-07:00 [thread overview]
Message-ID: <l3kkud$kto$1@dont-email.me> (raw)
In-Reply-To: <9ee842b6-b053-4f4e-94df-66459ec1fb7c@googlegroups.com>
On 10/15/2013 02:13 PM, Eryndlia Mavourneen wrote:
>
> Thanks, Jeff. This could be a good way to manage things. Unfortunately, I
> can not guarantee that I can perform a trim operation or that the last
> character is indeed not being used (for the placement of a nul). I suppose I
> could create the wrapper, as you said, and copy the String (1 .. size) to a
> String (1 .. size + 1) and place a nul in the last character of the target
> string. Of course, this does not add a lot of overhead for short strings,
> but it is a hard real-time system.
I would use the To_C or New_String functions to ensure that what is being passed
to C is convention-C and NUL-terminated.
--
Jeff Carter
"Help! Help! I'm being repressed!"
Monty Python & the Holy Grail
67
next prev parent reply other threads:[~2013-10-16 0:00 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-15 19:54 Passing a String to a C/C++ Subprogram (Special Case) Eryndlia Mavourneen
2013-10-15 20:11 ` Adam Beneschan
2013-10-15 21:02 ` Eryndlia Mavourneen
2013-10-16 7:17 ` Dmitry A. Kazakov
2013-10-16 15:14 ` Jeffrey Carter
2013-10-16 17:32 ` Martin
2013-10-16 17:42 ` Eryndlia Mavourneen
2013-10-16 17:54 ` Martin
2013-10-16 18:13 ` Eryndlia Mavourneen
2013-10-16 19:40 ` Simon Wright
2013-10-16 20:02 ` Eryndlia Mavourneen
2013-10-19 2:11 ` Randy Brukardt
2013-10-16 19:11 ` Adam Beneschan
2013-10-16 21:31 ` Martin
2013-10-16 21:41 ` Adam Beneschan
2013-10-16 23:15 ` Martin
2013-10-15 20:59 ` Jeffrey Carter
2013-10-15 21:13 ` Eryndlia Mavourneen
2013-10-15 22:19 ` Shark8
2013-10-16 0:00 ` Jeffrey Carter [this message]
2013-10-17 9:55 ` Georg Bauhaus
2013-10-16 20:17 ` sbelmont700
2013-10-16 20:48 ` Adam Beneschan
2013-10-17 13:05 ` Eryndlia Mavourneen
2013-10-17 13:58 ` sbelmont700
2013-10-17 16:28 ` Eryndlia Mavourneen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox