From: awdorrin <awdorrin@gmail.com>
Subject: Interfaces.C.String.Update
Date: Mon, 28 Nov 2011 07:55:42 -0800 (PST)
Date: 2011-11-28T07:55:42-08:00 [thread overview]
Message-ID: <83380fe1-c4c4-4b32-8f2e-f9cc4a862644@n35g2000yqf.googlegroups.com> (raw)
What is the suggested method to null terminate an Ada string being
passed back to C via Interfaces.C.Strings.Update() ?
I've been looking at the code for i-cstrin.adb, and it seems that by
default that the procedure, when passing in an Ada String, uses To_C
with Append_Null set to False.
I was trying to determine if I should manually place the null
character, or instead call Update like:
Update( cPtr, 0, To_C( AStr, Append_Nul => True), False);
I haven't been able to find any discussions on this, so I'm just not
sure what the 'best' approach for this would be.
next reply other threads:[~2011-11-28 15:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-28 15:55 awdorrin [this message]
2011-11-28 16:09 ` Interfaces.C.String.Update Adam Beneschan
2011-11-28 16:22 ` Interfaces.C.String.Update Ludovic Brenta
2011-11-28 16:35 ` Interfaces.C.String.Update awdorrin
2011-11-28 17:37 ` Interfaces.C.String.Update Ludovic Brenta
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox