--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/db92b4d8-58aa-4033-a446-d4f009c0215c%40googlegroups.com.
--
D_ATS_GCATS, right ? Or I'm still missing something ?(or cast it into a non-linear string).Then you need to explicitly free the linear string at some point in your programYou can also do $UNSAFE.castvwtp0{Strptr1}(pointer) to get a linear string.ATS has no GC.You can use libgc to do malloc/free needed in the C code generatedfrom ATS source. In that way, you get GC from libgc.
On Sat, Oct 7, 2017 at 7:56 AM, Russoul <russ...@gmail.com> wrote:
And how to correctly convert char* to string ? Just $UNSAFE.cast{string}(pointer) ? Will the original char* be GCed by ATS ?
суббота, 7 октября 2017 г., 14:33:13 UTC+3 пользователь gmhwxi написал:
Assuming that you are targeting C. I would suggest that you use snprintf
(plus $UNSAFE.cast).
On Saturday, October 7, 2017 at 5:40:01 AM UTC-4, Russoul wrote:convert primitives (int,float,...) to string (or linear string). Convert native char* to string and reversed ?
--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.