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) :
What's the result of `(apply + (list -3 4 2))'?
Visually impaired? Let me spell it for you (wav file) download WAV