guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

proposal: scm_string2str() and scm_symbol2str()


From: stefan
Subject: proposal: scm_string2str() and scm_symbol2str()
Date: Mon, 12 Nov 2001 13:44:21 +0100 (CET)

Dear Guile'rs,

I would like to propose the follow gh_() equivalents:

gh_scm2newstr()    ->  scm_string2str() in string.[ch]
gh_symbol2newstr() ->  scm_symbol2str() in symbol.[ch]

Both taking the (SCM obj, char *context) and allocating memory via
scm_must_malloc().  Thus the user can safely free the returned strings
with scm_must_free().  The latter feature would be an improvement to the
previous gh_() interface functions, for which the user was told to free()
them directly.  This caused problems when libguile.so used libc malloc()
and the calling application used its own standard free(), which might not
be libc free().
Please tell me if I can continue to implement these function.  I can check
it directly into CVS.

Cheers,
        address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]