Welcome to the CHICKEN Scheme pasting service

Copying a c-string results in garbage added by zilti on Thu Sep 1 22:52:53 2022

(define-method (toml-string (tarr <TomlArray>) (index <integer>))
  ((foreign-lambda* c-string ((c-pointer tarr)
                              (int index))
     "toml_datum_t datum = toml_string_at(tarr, index);"
     "char data[strlen(datum.u.s)+1];"
     "strcpy(data, datum.u.s);"
     "free(datum.u.s);"
     "C_return(data);")
   (ptr tarr) index))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which procedure returns the number of elements in a list?
Visually impaired? Let me spell it for you (wav file) download WAV