Hallo list,
I have a C function like this:
___UCS_2STRING tsk_home_dir(void);
which is exported like this:
(define home-directory (c-lambda () UCS-2-string "tsk_home_dir"))
Everytime tsk_home_dir is called it allocates a new string. Who must free this memory? C or Scheme?
Cheers,
Afficher les réponses par date
Hallo,
On Mon, Mar 2, 2009 at 5:07 PM, Alex Queiroz asandroq@gmail.com wrote:
I have a C function like this:
___UCS_2STRING tsk_home_dir(void);
which is exported like this:
(define home-directory (c-lambda () UCS-2-string "tsk_home_dir"))
Everytime tsk_home_dir is called it allocates a new string. Who must free this memory? C or Scheme?
Hmmm, wasn't my question well written or wasn't it just seen? :)
Cheers,
Everytime tsk_home_dir is called it allocates a new string. Who
must free this memory? C or Scheme?https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
From the gambit-c manual : Any C string type passed to the Scheme
environment causes the creation of a fresh Scheme string containing a copy of the C string...
Hallo,
On Wed, Mar 11, 2009 at 11:00 AM, Jeremie Lasalle Ratelle pouexmachinax@gmail.com wrote:
Everytime tsk_home_dir is called it allocates a new string. Who must free this memory? C or Scheme?
From the gambit-c manual : Any C string type passed to the Scheme environment causes the creation of a fresh Scheme string containing a copy of the C string...
And I thought I read the whole C interface part! Thanks :)